block: use bio_io_error directly
Subsystems (5)
PATCH 1/1 block: use bio_io_error directly
bio_io_error is capable of replacing the two lines.
Cc Christoph Hellwig <[email protected]>
Cc Philipp Reisner <[email protected]>
Cc Lars Ellenberg <[email protected]>
Cc Mike Snitzer <[email protected]>
Cc Sagi Grimberg <[email protected]>
Cc Alexander Viro <[email protected]>
Signed-off-by Guoqing Jiang <[email protected]>
--- drivers/block/drbd/drbd_int.h | 3 +-- drivers/md/dm-mpath.c | 3 +-- drivers/nvme/target/io-cmd.c | 3 +-- fs/block_dev.c | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-)
drivers/block/drbd/drbd_int.h +1 -2
@@ -1630,8 +1630,7 @@ static inline void drbd_generic_make_request(struct drbd_device *device,__release (local);if (!bio->bi_bdev) {drbd_err (device,"drbd_generic_make_request: bio->bi_bdev == NULL\n" ); - bio->bi_status =BLK_STS_IOERR ; -bio_endio (bio); +bio_io_error (bio);return ; }
drivers/md/dm-mpath.c +1 -2
@@ -623,8 +623,7 @@ static void process_queued_bios(struct work_struct *work) r =__multipath_map_bio (m, bio,get_mpio_from_bio (bio));switch (r) {case DM_MAPIO_KILL : - bio->bi_status =BLK_STS_IOERR ; -bio_endio (bio); +bio_io_error (bio);break ;case DM_MAPIO_REQUEUE : bio->bi_status =BLK_STS_DM_REQUEUE ;
drivers/nvme/target/io-cmd.c +1 -2
@@ -145,8 +145,7 @@ static void nvmet_execute_discard(struct nvmet_req *req) bio->bi_private = req; bio->bi_end_io = nvmet_bio_done;if (status) { - bio->bi_status =BLK_STS_IOERR ; -bio_endio (bio); +bio_io_error (bio); }else {submit_bio (bio); }
fs/block_dev.c +1 -2
@@ -370,8 +370,7 @@ __blkdev_direct_IO(struct kiocb *iocb, struct iov_iter *iter, int nr_pages) ret =bio_iov_iter_get_pages (bio, iter);if (unlikely (ret)) { - bio->bi_status =BLK_STS_IOERR ; -bio_endio (bio); +bio_io_error (bio);break ; }
Signature · 1 line
2.10.0