projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
18d7817
)
block: get rid of useless goto and label in blk_mq_get_new_requests()
author
Jens Axboe
<axboe@kernel.dk>
Thu, 2 Dec 2021 19:42:58 +0000
(12:42 -0700)
committer
Jens Axboe
<axboe@kernel.dk>
Thu, 2 Dec 2021 19:42:58 +0000
(12:42 -0700)
Expected case is returning a request, just check for success and return
the request rather than having an error label.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c
patch
|
blob
|
history
diff --git
a/block/blk-mq.c
b/block/blk-mq.c
index ecfc47fad2368e40678ac659be2b2ad727437026..ca33cb755c5f69eda0260edc6c4e7111c608f928 100644
(file)
--- a/
block/blk-mq.c
+++ b/
block/blk-mq.c
@@
-2720,11
+2720,8
@@
static struct request *blk_mq_get_new_requests(struct request_queue *q,
}
rq = __blk_mq_alloc_requests(&data);
- if (!rq)
- goto fail;
- return rq;
-
-fail:
+ if (rq)
+ return rq;
rq_qos_cleanup(q, bio);
if (bio->bi_opf & REQ_NOWAIT)
bio_wouldblock_error(bio);