From 7b001d6a0c0c7b92e989c2c3b1d8e151f1df1acc Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Fri, 12 Apr 2013 00:03:19 -0400 Subject: [PATCH] ext4: clear buffer_uninit flag when submitting IO Currently noone cleared buffer_uninit flag. This results in writeback needlessly marking io_end as needing extent conversion scanning extent tree for extents to convert. So clear the buffer_uninit flag once the buffer is submitted for IO and the flag is transformed into EXT4_IO_END_UNWRITTEN flag. Signed-off-by: Jan Kara Signed-off-by: "Theodore Ts'o" Reviewed-by: Zheng Liu --- fs/ext4/page-io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c index 14f9837350d1..5929cd0baa20 100644 --- a/fs/ext4/page-io.c +++ b/fs/ext4/page-io.c @@ -387,7 +387,7 @@ submit_and_retry: if (ret != bh->b_size) goto submit_and_retry; io_end = io->io_end; - if (buffer_uninit(bh)) + if (test_clear_buffer_uninit(bh)) ext4_set_io_unwritten_flag(inode, io_end); io_end->size += bh->b_size; io->io_next_block++; -- 2.30.2