* [PATCH] Block: blk-flush: removed an unnecessary else statement
@ 2017-12-20 16:23 Khan M Rashedun-Naby
0 siblings, 0 replies; only message in thread
From: Khan M Rashedun-Naby @ 2017-12-20 16:23 UTC (permalink / raw)
To: axboe; +Cc: linux-block, linux-kernel, Khan M Rashedun-Naby
As both of the if and else statement block is returning something then
there is no need of the else statement. Thus this else statement
has been removed.
Signed-off-by: Khan M Rashedun-Naby <naby88@gmail.com>
---
block/blk-flush.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/block/blk-flush.c b/block/blk-flush.c
index f171706..b629014 100644
--- a/block/blk-flush.c
+++ b/block/blk-flush.c
@@ -137,13 +137,14 @@ static bool blk_flush_queue_rq(struct request *rq, bool add_front)
if (rq->q->mq_ops) {
blk_mq_add_to_requeue_list(rq, add_front, true);
return false;
- } else {
- if (add_front)
- list_add(&rq->queuelist, &rq->q->queue_head);
- else
- list_add_tail(&rq->queuelist, &rq->q->queue_head);
- return true;
}
+
+ if (add_front)
+ list_add(&rq->queuelist, &rq->q->queue_head);
+ else
+ list_add_tail(&rq->queuelist, &rq->q->queue_head);
+
+ return true;
}
/**
--
2.7.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-12-20 16:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-20 16:23 [PATCH] Block: blk-flush: removed an unnecessary else statement Khan M Rashedun-Naby
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).