summaryrefslogtreecommitdiffstats
path: root/block/blk-exec.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-04-20 10:02:55 -0400
committerJens Axboe <axboe@fb.com>2017-04-20 14:16:10 -0400
commitb7819b9259185dcdcc81eb32182a4dc13d695738 (patch)
tree96d76ffadf2718b65faf6004b734ed6b094f30ae /block/blk-exec.c
parent75a500ef6ecb6266d4d1347fc7eb4b298b566b3b (diff)
block: remove the blk_execute_rq return value
The function only returns -EIO if rq->errors is non-zero, which is not very useful and lets a large number of callers ignore the return value. Just let the callers figure out their error themselves. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Bart Van Assche <Bart.VanAssche@sandisk.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-exec.c')
-rw-r--r--block/blk-exec.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/block/blk-exec.c b/block/blk-exec.c
index 8cd0e9bc8dc8..afa383248c7c 100644
--- a/block/blk-exec.c
+++ b/block/blk-exec.c
@@ -92,11 +92,10 @@ EXPORT_SYMBOL_GPL(blk_execute_rq_nowait);
92 * Insert a fully prepared request at the back of the I/O scheduler queue 92 * Insert a fully prepared request at the back of the I/O scheduler queue
93 * for execution and wait for completion. 93 * for execution and wait for completion.
94 */ 94 */
95int blk_execute_rq(struct request_queue *q, struct gendisk *bd_disk, 95void blk_execute_rq(struct request_queue *q, struct gendisk *bd_disk,
96 struct request *rq, int at_head) 96 struct request *rq, int at_head)
97{ 97{
98 DECLARE_COMPLETION_ONSTACK(wait); 98 DECLARE_COMPLETION_ONSTACK(wait);
99 int err = 0;
100 unsigned long hang_check; 99 unsigned long hang_check;
101 100
102 rq->end_io_data = &wait; 101 rq->end_io_data = &wait;
@@ -108,10 +107,5 @@ int blk_execute_rq(struct request_queue *q, struct gendisk *bd_disk,
108 while (!wait_for_completion_io_timeout(&wait, hang_check * (HZ/2))); 107 while (!wait_for_completion_io_timeout(&wait, hang_check * (HZ/2)));
109 else 108 else
110 wait_for_completion_io(&wait); 109 wait_for_completion_io(&wait);
111
112 if (rq->errors)
113 err = -EIO;
114
115 return err;
116} 110}
117EXPORT_SYMBOL(blk_execute_rq); 111EXPORT_SYMBOL(blk_execute_rq);