]> Pileus Git - ~andy/linux/commitdiff
ext4: clear buffer_uninit flag when submitting IO
authorJan Kara <jack@suse.cz>
Fri, 12 Apr 2013 04:03:19 +0000 (00:03 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 12 Apr 2013 04:03:19 +0000 (00:03 -0400)
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 <jack@suse.cz>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: Zheng Liu <wenqing.lz@taobao.com>
fs/ext4/page-io.c

index 14f9837350d12ccf9dac2592386d8ac8b567cf2c..5929cd0baa2077ebce9a3b0c51d528de9b89ac33 100644 (file)
@@ -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++;