summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLi Dongyang <dongyangli@ddn.com>2018-09-15 17:11:25 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-09-29 03:07:34 -0700
commitb344b3a7328b4e879a384b542d4b06be998436df (patch)
treed302594fa740fcb1fd005bc29bda1a66772bf150
parent4ba9e687ed89fd2a3fe6a3d7e95daea8669edb94 (diff)
ext4: don't mark mmp buffer head dirty
commit fe18d649891d813964d3aaeebad873f281627fbc upstream. Marking mmp bh dirty before writing it will make writeback pick up mmp block later and submit a write, we don't want the duplicate write as kmmpd thread should have full control of reading and writing the mmp block. Another reason is we will also have random I/O error on the writeback request when blk integrity is enabled, because kmmpd could modify the content of the mmp block(e.g. setting new seq and time) while the mmp block is under I/O requested by writeback. Signed-off-by: Li Dongyang <dongyangli@ddn.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Andreas Dilger <adilger@dilger.ca> Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--fs/ext4/mmp.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/ext4/mmp.c b/fs/ext4/mmp.c
index d89754ef1aab..c2e830a6206d 100644
--- a/fs/ext4/mmp.c
+++ b/fs/ext4/mmp.c
@@ -48,7 +48,6 @@ static int write_mmp_block(struct super_block *sb, struct buffer_head *bh)
*/
sb_start_write(sb);
ext4_mmp_csum_set(sb, mmp);
- mark_buffer_dirty(bh);
lock_buffer(bh);
bh->b_end_io = end_buffer_write_sync;
get_bh(bh);