[PATCH v4 0/2] hfsplus: fix lock leak and refactor hidden dir search

From: Zilin Guan

Date: Sat Mar 21 2026 - 04:02:34 EST


This series updates hidden-directory lookup handling in
hfsplus_fill_super().

Patch 1 fixes a B-tree lock leak on an error path in hidden-directory
lookup.

Patch 2 refactors the lookup path into a helper to encapsulate resource
lifetime and simplify error handling.

Changes in v4:
- Refactor hidden-dir lookup branch handling in hfsplus_fill_super().

Changes in v3:
- Use unlikely(err) for hfs_find_init() and hfsplus_cat_build_key() checks.
- Map hfs_brec_read() errors to -ENOENT to preserve existing behavior.

Changes in v2:
- Add patch 2 to extract hidden-directory lookup into a helper function.

Zilin Guan (2):
hfsplus: fix held lock freed on hfsplus_fill_super()
hfsplus: extract hidden directory search into a helper function

fs/hfsplus/super.c | 42 ++++++++++++++++++++++++++++++++----------
1 file changed, 32 insertions(+), 10 deletions(-)

--
2.34.1