From: Khan M Rashedun-Naby <naby88@gmail.com>
To: axboe@kernel.dk
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
Khan M Rashedun-Naby <naby88@gmail.com>
Subject: [PATCH] Block: blk-flush: removed an unnecessary else statement
Date: Wed, 20 Dec 2017 22:23:55 +0600 [thread overview]
Message-ID: <1513787035-18973-1-git-send-email-naby88@gmail.com> (raw)
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
reply other threads:[~2017-12-20 16:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1513787035-18973-1-git-send-email-naby88@gmail.com \
--to=naby88@gmail.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®