summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/btrfs/inode.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index f78c5640c6dc..c242d0230db9 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -8366,11 +8366,8 @@ static void btrfs_endio_direct_read(struct bio *bio)
8366 struct btrfs_io_bio *io_bio = btrfs_io_bio(bio); 8366 struct btrfs_io_bio *io_bio = btrfs_io_bio(bio);
8367 blk_status_t err = bio->bi_status; 8367 blk_status_t err = bio->bi_status;
8368 8368
8369 if (dip->flags & BTRFS_DIO_ORIG_BIO_SUBMITTED) { 8369 if (dip->flags & BTRFS_DIO_ORIG_BIO_SUBMITTED)
8370 err = btrfs_subio_endio_read(inode, io_bio, err); 8370 err = btrfs_subio_endio_read(inode, io_bio, err);
8371 if (!err)
8372 bio->bi_status = 0;
8373 }
8374 8371
8375 unlock_extent(&BTRFS_I(inode)->io_tree, dip->logical_offset, 8372 unlock_extent(&BTRFS_I(inode)->io_tree, dip->logical_offset,
8376 dip->logical_offset + dip->bytes - 1); 8373 dip->logical_offset + dip->bytes - 1);
@@ -8378,7 +8375,7 @@ static void btrfs_endio_direct_read(struct bio *bio)
8378 8375
8379 kfree(dip); 8376 kfree(dip);
8380 8377
8381 dio_bio->bi_status = bio->bi_status; 8378 dio_bio->bi_status = err;
8382 dio_end_io(dio_bio); 8379 dio_end_io(dio_bio);
8383 8380
8384 if (io_bio->end_io) 8381 if (io_bio->end_io)