[PATCH 0/2] hfs, hfsplus: do not end readdir early after an unlink
From: Hengyu Liang
Date: Thu Nov 12 2026 - 06:22:42 EST
Since the readdir rework in v7.2, HFS and HFS+ end a directory walk
early when the caller deletes the entries it has read. Both filesystems
got the same change, so the two patches make the same fix.
Tested on hfs for-next with KASAN and lockdep. The reproducers pass and
generic/637 still passes on both filesystems. A run of 30 generic tests
gives the same results with and without the patches on HFS+. On HFS,
fsck finds the test volume inconsistent also without the patches, so I
ran generic/013, 028 and 637 on fresh volumes six times each: 013 fails
and the other two pass, with and without the patches.
Hengyu Liang (2):
hfs: do not end readdir at i_size after an unlink
hfsplus: do not end readdir at i_size after an unlink
fs/hfs/dir.c | 27 +++++++++++++++++++--------
fs/hfsplus/dir.c | 27 +++++++++++++++++++--------
2 files changed, 38 insertions(+), 16 deletions(-)
base-commit: 34ee5f8c2198db9585da6c181c50869d2eb43c3a
--
2.53.0