Commit dd7b15aeac80 for kernel
commit dd7b15aeac80425faa7f0af55776be117db61548
Merge: d28fb91dd82a f278d04be3ac
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date: Tue Oct 20 16:06:21 2026 -1000
Merge tag 'hfs-v7.4-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/vdubeyko/hfs
Pull hfs/hfsplus updates from Viacheslav Dubeyko:
"Fix {hfs,hfsplus}_btree_close() (Bruno Produit):
- B-tree nodes with a zero reference count remain in the node hash
until folio reclaim or tree teardown frees them. The folio release
callbacks remove nodes while holding hash_lock, but
hfs_btree_close() walks and frees the same hash without that lock.
Reclaim can therefore unhash and free a node after close has loaded
its pointer, causing a use-after-free or double-free. Detach each
node with hfs_bnode_unhash() while holding hash_lock before
inspecting and freeing it. Drop the lock before hfs_bnode_free() so
a large tree is not freed while holding a spinlock.
Fix hfs_inode_setattr() and hfs_brec_insert() (Davy Felipe):
- hfs_inode_setattr() rejects unsupported UID, GID and mode changes,
but returns the value stored in error when the filesystem is not
mounted with the quiet option. At this point error is zero, as
execution has already passed a successful setattr_prepare() call.
As a result, unsupported attribute changes are incorrectly reported
to userspace as successful even though the inode remains unchanged.
Return -EPERM for these operations while preserving the existing
behavior for quiet mounts.
- hfs_brec_insert() may fail while inserting a new extent record, but
__hfs_ext_write_extent() currently ignores its return value and
clears HFS_FLG_EXT_DIRTY and HFS_FLG_EXT_NEW as if the insertion
had succeeded. Use a reusable B-tree node range helper that takes
the find data and the expected record size. The helper validates
the bnode and tree pointers, entry offset and entry length, and
ensures that the write range fits within the node.
Fix failure in xfstests generic/339 (Viacheslav Dubeyko):
- The test left an HFS+ volume corrupted and, as a result,
fsck.hfsplus reported a long run of "Illegal name". The root cause
is that fs/hfsplus/unicode.c's decomposition table (Apple Technote
#1150) decomposes each source character entirely on its own and
never does anything further with the result. Real fsck_hfs has
carried a permanent "FixDecomps" fixup in CatalogCheck.c for
exactly what that leaves unhandled. The fix makes hfsplus store,
hash and compare names the same way current macOS does"
* tag 'hfs-v7.4-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/vdubeyko/hfs:
hfs: handle extent B-tree write errors
hfsplus: add KUnit coverage for canonical reordering and legacy fixups
hfsplus: canonicalize decomposed catalog names like fsck_hfs expects
hfsplus: add Unicode combining-class and legacy decomposition data
hfs/hfsplus: serialize B-tree close against folio release
hfs: return -EPERM for unsupported setattr changes