summaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorGuoqing Jiang2017-06-02 10:08:50 +0200
committerDavid Sterba2017-06-19 18:26:01 +0200
commit054ec2f626ed5bc1633addfabb1d8de1b56f949d (patch)
treeeb184c938d79ab0ac5a66e8d6fd34e21617ffeaf /fs/btrfs
parentBtrfs: use memalloc_nofs and kvzalloc() for free space tree bitmaps (diff)
downloadkernel-qcow2-linux-054ec2f626ed5bc1633addfabb1d8de1b56f949d.tar.gz
kernel-qcow2-linux-054ec2f626ed5bc1633addfabb1d8de1b56f949d.tar.xz
kernel-qcow2-linux-054ec2f626ed5bc1633addfabb1d8de1b56f949d.zip
btrfs: simplify code with bio_io_error
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>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/inode.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 0a1ec5cd3b8f..4e33c3fded5c 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -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