btrfs: simplify code with bio_io_error
PATCH 1/1 btrfs: simplify code with bio_io_error
bio_io_error was introduced in the commit 4246a0b
("block: add a bi_error field to struct bio"), so
use it to simplify code.
Signed-off-by Guoqing Jiang <[email protected]>
--- fs/btrfs/inode.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
fs/btrfs/inode.c +1 -2
@@ -8649,8 +8649,7 @@ static void btrfs_submit_direct(struct bio *dio_bio, struct inode *inode,* callbacks - they require an allocated dip and a clone of dio_bio. */ if (io_bio && dip) { - io_bio->bi_error = -EIO ; -bio_endio (io_bio); +bio_io_error (io_bio);/* * The end io callbacks free our dip, do the final put on io_bio * and all the cleanup and final put for dio_bio (through
Signature · 1 line
2.10.0
Quoted 5 lines · Guoqing Jiang
bio_io_errorwas introduced in the commit 4246a0b
("block: add abi_errorfield to struct bio"), so
use it to simplify code.Signed-off-by Guoqing Jiang <[email protected]>
Reviewed-by David Sterba <[email protected]>