Commit 265600b7 authored by Baolin Wang's avatar Baolin Wang Committed by Jens Axboe

block: Remove a duplicative condition

Remove a duplicative condition to remove below cppcheck warnings:

"warning: Redundant condition: sched_allow_merge. '!A || (A && B)' is
equivalent to '!A || B' [redundantCondition]"
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarBaolin Wang <baolin.wang@linux.alibaba.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 8327cce5
...@@ -996,13 +996,11 @@ static enum bio_merge_status blk_attempt_bio_merge(struct request_queue *q, ...@@ -996,13 +996,11 @@ static enum bio_merge_status blk_attempt_bio_merge(struct request_queue *q,
switch (blk_try_merge(rq, bio)) { switch (blk_try_merge(rq, bio)) {
case ELEVATOR_BACK_MERGE: case ELEVATOR_BACK_MERGE:
if (!sched_allow_merge || if (!sched_allow_merge || blk_mq_sched_allow_merge(q, rq, bio))
(sched_allow_merge && blk_mq_sched_allow_merge(q, rq, bio)))
return bio_attempt_back_merge(rq, bio, nr_segs); return bio_attempt_back_merge(rq, bio, nr_segs);
break; break;
case ELEVATOR_FRONT_MERGE: case ELEVATOR_FRONT_MERGE:
if (!sched_allow_merge || if (!sched_allow_merge || blk_mq_sched_allow_merge(q, rq, bio))
(sched_allow_merge && blk_mq_sched_allow_merge(q, rq, bio)))
return bio_attempt_front_merge(rq, bio, nr_segs); return bio_attempt_front_merge(rq, bio, nr_segs);
break; break;
case ELEVATOR_DISCARD_MERGE: case ELEVATOR_DISCARD_MERGE:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment