mirror-linux/fs/ntfs
DaeMyung Kang 2beaa98b46 ntfs: restore $MFT mirror contents check
check_mft_mirror() still computes the number of bytes to validate in each
mirrored MFT record, but the actual comparison against $MFTMirr was dropped
when the superblock code was updated.

As a result, mount misses a stale or inconsistent $MFTMirr as long as both
records pass the structural baad-record checks. Restore the comparison and
log an error when the primary $MFT record differs from its mirror copy.

Returning false lets the existing mount error handling mark the volume as
having NTFS errors and, with on_errors=remount-ro, continue read-only. The
default on_errors=continue mount policy still allows the mount to proceed.

Fixes: 6251f0b0de ("ntfs: update super block operations")
Signed-off-by: DaeMyung Kang <charsyam@gmail.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
2026-05-11 23:30:48 +09:00
..
Kconfig ntfs: select FS_IOMAP in Kconfig 2026-03-05 17:37:02 +09:00
Makefile ntfs: add Kconfig and Makefile 2026-02-19 21:51:00 +09:00
aops.c ntfs: remove noop_direct_IO from address_space_operations 2026-04-18 11:33:03 +09:00
attrib.c ntfs: validate attribute name bounds before returning it 2026-05-10 00:42:28 +09:00
attrib.h ntfs: update in-memory, on-disk structures and headers 2026-02-19 21:48:06 +09:00
attrlist.c ntfs: fix variable dereferenced before check ni and attr in ntfs_attrlist_entry_add() 2026-05-03 10:40:09 +09:00
attrlist.h ntfs: update in-memory, on-disk structures and headers 2026-02-19 21:48:06 +09:00
bdev-io.c ntfs: fix copy length in ntfs_bdev_write() for non-page-aligned start 2026-05-08 23:50:53 +09:00
bitmap.c ntfs: fix invalid PTR_ERR() usage in __ntfs_bitmap_set_bits_in_run() 2026-04-28 21:59:59 +09:00
bitmap.h ntfs: update in-memory, on-disk structures and headers 2026-02-19 21:48:06 +09:00
collate.c ntfs: update misc operations 2026-02-19 21:50:56 +09:00
collate.h ntfs: update in-memory, on-disk structures and headers 2026-02-19 21:48:06 +09:00
compress.c ntfs: fix potential 32-bit truncation in ntfs_write_cb() 2026-04-18 11:33:21 +09:00
debug.c ntfs: update misc operations 2026-02-19 21:50:56 +09:00
debug.h ntfs: update in-memory, on-disk structures and headers 2026-02-19 21:48:06 +09:00
dir.c ntfs: fix NULL dereference in ntfs_index_walk_down() 2026-04-27 22:29:04 +09:00
dir.h ntfs: update in-memory, on-disk structures and headers 2026-02-19 21:48:06 +09:00
ea.c ntfs: fix uninitialized variables in ntfs_ea_set_wsl_inode() 2026-04-18 11:33:09 +09:00
ea.h ntfs: update in-memory, on-disk structures and headers 2026-02-19 21:48:06 +09:00
file.c ntfs: fix mmap_prepare writable check for shared mappings 2026-04-22 18:33:15 +09:00
index.c ntfs: fix out-of-bounds write in ntfs_index_walk_down() 2026-05-08 23:51:10 +09:00
index.h ntfs: update in-memory, on-disk structures and headers 2026-02-19 21:48:06 +09:00
inode.c ntfs: avoid use-after-free of index inode in ntfs_inode_sync_filename() 2026-05-08 23:50:57 +09:00
inode.h ntfs: change mft_no type to u64 2026-03-06 22:08:39 +09:00
iomap.c ntfs: fix error handling in ntfs_write_iomap_end_resident() 2026-04-27 22:58:52 +09:00
iomap.h ntfs: update in-memory, on-disk structures and headers 2026-02-19 21:48:06 +09:00
layout.h ntfs: update in-memory, on-disk structures and headers 2026-02-19 21:48:06 +09:00
lcnalloc.c ntfs: fix variable dereferenced before check warnings 2026-03-16 20:27:45 +09:00
lcnalloc.h ntfs: update in-memory, on-disk structures and headers 2026-02-19 21:48:06 +09:00
logfile.c ntfs: fix empty_buf and ra lifetime bugs in ntfs_empty_logfile() 2026-05-10 16:45:28 +09:00
logfile.h ntfs: update in-memory, on-disk structures and headers 2026-02-19 21:48:06 +09:00
malloc.h Revert "fs: Remove NTFS classic" 2026-02-19 21:48:05 +09:00
mft.c ntfs: fix MFT bitmap scan 2^32 boundary check 2026-05-10 00:42:27 +09:00
mft.h ntfs: change mft_no type to u64 2026-03-06 22:08:39 +09:00
mst.c ntfs: update mft operations 2026-02-19 21:48:07 +09:00
namei.c ntfs: avoid leaking uninitialised bytes in new security descriptors 2026-05-08 23:51:13 +09:00
ntfs.h ntfs: update in-memory, on-disk structures and headers 2026-02-19 21:48:06 +09:00
object_id.c ntfs: update misc operations 2026-02-19 21:50:56 +09:00
object_id.h ntfs: update in-memory, on-disk structures and headers 2026-02-19 21:48:06 +09:00
quota.c ntfs: update misc operations 2026-02-19 21:50:56 +09:00
quota.h ntfs: update in-memory, on-disk structures and headers 2026-02-19 21:48:06 +09:00
reparse.c ntfs: fix WSL symlink target leak on reparse failure 2026-04-27 22:29:08 +09:00
reparse.h ntfs: update in-memory, on-disk structures and headers 2026-02-19 21:48:06 +09:00
runlist.c ntfs: fix out-of-bounds write in ntfs_rl_collapse_range() merge path 2026-05-08 23:51:07 +09:00
runlist.h ntfs: update in-memory, on-disk structures and headers 2026-02-19 21:48:06 +09:00
super.c ntfs: restore $MFT mirror contents check 2026-05-11 23:30:48 +09:00
sysctl.c ntfs: fix sysctl table registration and path 2026-03-01 14:53:37 +09:00
sysctl.h ntfs: update in-memory, on-disk structures and headers 2026-02-19 21:48:06 +09:00
time.h ntfs: update in-memory, on-disk structures and headers 2026-02-19 21:48:06 +09:00
unistr.c ntfs: update misc operations 2026-02-19 21:50:56 +09:00
upcase.c ntfs: update misc operations 2026-02-19 21:50:56 +09:00
volume.h ntfs: update in-memory, on-disk structures and headers 2026-02-19 21:48:06 +09:00