]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: fix mmap write protection for data=journal mode
authorJan Kara <jack@suse.cz>
Tue, 27 Oct 2020 13:27:51 +0000 (14:27 +0100)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 28 Oct 2020 17:42:42 +0000 (13:42 -0400)
commit078bb72e28f52c058b01878c35e98021843043c6
tree7aeada62c004bbe8858a52f8a4d984ee7e2d4756
parent820978fde95c50d9b1172e69e8a01cb3a9bf9f83
ext4: fix mmap write protection for data=journal mode

Commit 4877ec36b52a "ext4: data=journal: write-protect pages on
j_submit_inode_data_buffers()") added calls ext4_jbd2_inode_add_write()
to track inode ranges whose mappings need to get write-protected during
transaction commits.  However the added calls use wrong start of a range
(0 instead of page offset) and so write protection is not necessarily
effective.  Use correct range start to fix the problem.

Fixes: 4877ec36b52a ("ext4: data=journal: write-protect pages on j_submit_inode_data_buffers()")
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20201027132751.29858-1-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/inode.c