diff options
author | Christoph Hellwig <hch@lst.de> | 2017-06-03 03:38:06 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-06-09 11:27:32 -0400 |
commit | 4e4cbee93d56137ebff722be022cae5f70ef84fb (patch) | |
tree | 4fa7345155599fc6bdd653fca8c5224ddf90a5be /fs/direct-io.c | |
parent | fc17b6534eb8395f0b3133eb31d87deec32c642b (diff) |
block: switch bios to blk_status_t
Replace bi_error with a new bi_status to allow for a clear conversion.
Note that device mapper overloaded bi_error with a private value, which
we'll have to keep arround at least for now and thus propagate to a
proper blk_status_t value.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'fs/direct-io.c')
-rw-r--r-- | fs/direct-io.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/direct-io.c b/fs/direct-io.c index bb711e4b86c2..e8baaabebf13 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c | |||
@@ -294,7 +294,7 @@ static void dio_aio_complete_work(struct work_struct *work) | |||
294 | dio_complete(dio, 0, true); | 294 | dio_complete(dio, 0, true); |
295 | } | 295 | } |
296 | 296 | ||
297 | static int dio_bio_complete(struct dio *dio, struct bio *bio); | 297 | static blk_status_t dio_bio_complete(struct dio *dio, struct bio *bio); |
298 | 298 | ||
299 | /* | 299 | /* |
300 | * Asynchronous IO callback. | 300 | * Asynchronous IO callback. |
@@ -473,11 +473,11 @@ static struct bio *dio_await_one(struct dio *dio) | |||
473 | /* | 473 | /* |
474 | * Process one completed BIO. No locks are held. | 474 | * Process one completed BIO. No locks are held. |
475 | */ | 475 | */ |
476 | static int dio_bio_complete(struct dio *dio, struct bio *bio) | 476 | static blk_status_t dio_bio_complete(struct dio *dio, struct bio *bio) |
477 | { | 477 | { |
478 | struct bio_vec *bvec; | 478 | struct bio_vec *bvec; |
479 | unsigned i; | 479 | unsigned i; |
480 | int err = bio->bi_error; | 480 | blk_status_t err = bio->bi_status; |
481 | 481 | ||
482 | if (err) | 482 | if (err) |
483 | dio->io_error = -EIO; | 483 | dio->io_error = -EIO; |
@@ -536,7 +536,7 @@ static inline int dio_bio_reap(struct dio *dio, struct dio_submit *sdio) | |||
536 | bio = dio->bio_list; | 536 | bio = dio->bio_list; |
537 | dio->bio_list = bio->bi_private; | 537 | dio->bio_list = bio->bi_private; |
538 | spin_unlock_irqrestore(&dio->bio_lock, flags); | 538 | spin_unlock_irqrestore(&dio->bio_lock, flags); |
539 | ret2 = dio_bio_complete(dio, bio); | 539 | ret2 = blk_status_to_errno(dio_bio_complete(dio, bio)); |
540 | if (ret == 0) | 540 | if (ret == 0) |
541 | ret = ret2; | 541 | ret = ret2; |
542 | } | 542 | } |