]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
btrfs: simplify code with bio_io_error
authorGuoqing Jiang <gqjiang@suse.com>
Fri, 2 Jun 2017 08:08:50 +0000 (16:08 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Jun 2017 16:26:01 +0000 (18:26 +0200)
bio_io_error was introduced in the commit 4246a0b63bd8f56a1469b
("block: add a bi_error field to struct bio"), so use it to simplify
code.

Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c

index 0a1ec5cd3b8f823d12f714de06c5160b48f259b9..4e33c3fded5ca9484c4c74bc052e57bea9b2ad1c 100644 (file)
@@ -8647,8 +8647,7 @@ free_ordered:
         * callbacks - they require an allocated dip and a clone of dio_bio.
         */
        if (bio && dip) {
-               bio->bi_error = -EIO;
-               bio_endio(bio);
+               bio_io_error(bio);
                /*
                 * The end io callbacks free our dip, do the final put on bio
                 * and all the cleanup and final put for dio_bio (through