diff options
Diffstat (limited to 'fs/block_dev.c')
-rw-r--r-- | fs/block_dev.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c index 78d3257435c0..24615c76c1d0 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c | |||
@@ -307,10 +307,10 @@ static void blkdev_bio_end_io(struct bio *bio) | |||
307 | struct blkdev_dio *dio = bio->bi_private; | 307 | struct blkdev_dio *dio = bio->bi_private; |
308 | bool should_dirty = dio->should_dirty; | 308 | bool should_dirty = dio->should_dirty; |
309 | 309 | ||
310 | if (dio->multi_bio && !atomic_dec_and_test(&dio->ref)) { | 310 | if (bio->bi_status && !dio->bio.bi_status) |
311 | if (bio->bi_status && !dio->bio.bi_status) | 311 | dio->bio.bi_status = bio->bi_status; |
312 | dio->bio.bi_status = bio->bi_status; | 312 | |
313 | } else { | 313 | if (!dio->multi_bio || atomic_dec_and_test(&dio->ref)) { |
314 | if (!dio->is_sync) { | 314 | if (!dio->is_sync) { |
315 | struct kiocb *iocb = dio->iocb; | 315 | struct kiocb *iocb = dio->iocb; |
316 | ssize_t ret; | 316 | ssize_t ret; |