diff options
| author | 2026-04-30 20:54:47 +0900 | |
|---|---|---|
| committer | 2026-05-08 23:50:45 +0900 | |
| commit | 47773fa85e470e9896a22a99ccd5b5930d469680 (patch) | |
| tree | 878552e171b6de32fa82bd48430929a4318560cf /tools/testing/selftests/dm-verity/git:/ssh:/git@git.zx2c4.com | |
| parent | ntfs: fix variable dereferenced before check ni and attr in ntfs_attrlist_entry_add() (diff) | |
ntfs: use base mft_no when looking up base inode for extent record
When the mft record is an extent record, ntfs_may_write_mft_record()
looks up its base inode in the icache. The hash key passed to
find_inode_nowait() must be the base inode's mft number (na.mft_no,
set just above to MREF_LE(m->base_mft_record)), but the code passes
@mft_no, the extent record's own number.
find_inode_nowait() uses its second argument as the hashval, so the
lookup lands in the wrong bucket and almost always returns NULL.
ntfs_may_write_mft_record() then returns false and the writeback
path (ntfs_write_mft_block()) skips that extent record, leaving the
on-disk copy permanently out of sync with the in-memory one.
The original ilookup5_nowait() call this conversion replaced used
na.mft_no. Restore that.
Fixes: 115380f9a2f9 ("ntfs: update mft operations")
Signed-off-by: DaeMyung Kang <charsyam@gmail.com>
Reviewed-by: Hyunchul Lee <hyc.lee@gmail.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'tools/testing/selftests/dm-verity/git:/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions
