summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorHongling Zeng <zenghongling@kylinos.cn>2026-09-15 16:32:49 +0800
committerNamjae Jeon <linkinjeon@kernel.org>2026-10-20 18:41:44 +0900
commit5d0e57ea8e37db3e32d1b1b7fa4f3c7a94ff8e56 (patch)
tree5000963e63619c2fd2ef7aa287a3cd13fc15e4f8 /scripts/Makefile.thinlto
parent521978c4f4441953d67297286e5804485ae05698 (diff)
downloadlinux-5d0e57ea8e37db3e32d1b1b7fa4f3c7a94ff8e56.tar.gz
linux-5d0e57ea8e37db3e32d1b1b7fa4f3c7a94ff8e56.zip
ntfs: persist the dirty state after the final put_super() commits
The just-in-case mftmirr/mft commits and the final write_inode_now() in ntfs_put_super() can record NVolErrors() after the dirty state has been persisted, so errors from those points would leave the volume unmounted with a clean on-disk dirty bit - contradicting the "cannot unmount clean" guarantee ntfs_sync_volume_dirty_state() is meant to provide. Move the persistence to the end of ntfs_put_super(): keep the gated re-commits and the tail commits where they are, run ntfs_sync_volume_dirty_state() and the $Volume commit after the last write_inode_now(), and release vol->vol_ino only after the sync. The release order of the special inodes matters for the $Volume commit: writing the $Volume record mirrors it through ntfs_sync_mft_mirror() (record number 3 is below vol->mftmirr_size), which fails with -EIO and leaves the mirror stale once vol->mftmirr_ino is gone, so the mirror inode is released only after that commit. vol->vol_ino is then put before vol->mft_ino is dropped: if the commit failed before it could clear the dirty flag, ntfs_evict_big_inode() commits the inode again on its way out, and __ntfs_write_inode() resolves the runlist through vol->mft_ino. Reported-by: Baolin Liu <liubaolin@kylinos.cn> Cc: stable@vger.kernel.org Signed-off-by: Hongling Zeng <zenghongling@kylinos.cn> Reviewed-by: Hyunchul Lee <hyc.lee@gmail.com> Reviewed-by: Baolin Liu <liubaolin@kylinos.cn> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions