]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/ext4/page-io.c
ext4: optimize ext4_bio_write_page() when no extent conversion is needed
[karo-tx-linux.git] / fs / ext4 / page-io.c
index d5c391ffad7a378e6e07e201da5438e07fc875b3..0cfd03e19d7d221d346399f0f975ba59189eab72 100644 (file)
@@ -259,6 +259,11 @@ static void ext4_end_bio(struct bio *bio, int error)
                             bi_sector >> (inode->i_blkbits - 9));
        }
 
+       if (!(io_end->flag & EXT4_IO_END_UNWRITTEN)) {
+               ext4_free_io_end(io_end);
+               return;
+       }
+
        /* Add the io_end to per-inode completed io list*/
        spin_lock_irqsave(&EXT4_I(inode)->i_completed_io_lock, flags);
        list_add_tail(&io_end->list, &EXT4_I(inode)->i_completed_io_list);