mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 03:10:52 +07:00
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: kernel test robot <lkp@intel.com> Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
8327cce5ff
commit
265600b7b6
@ -996,13 +996,11 @@ static enum bio_merge_status blk_attempt_bio_merge(struct request_queue *q,
|
||||
|
||||
switch (blk_try_merge(rq, bio)) {
|
||||
case ELEVATOR_BACK_MERGE:
|
||||
if (!sched_allow_merge ||
|
||||
(sched_allow_merge && blk_mq_sched_allow_merge(q, rq, bio)))
|
||||
if (!sched_allow_merge || blk_mq_sched_allow_merge(q, rq, bio))
|
||||
return bio_attempt_back_merge(rq, bio, nr_segs);
|
||||
break;
|
||||
case ELEVATOR_FRONT_MERGE:
|
||||
if (!sched_allow_merge ||
|
||||
(sched_allow_merge && blk_mq_sched_allow_merge(q, rq, bio)))
|
||||
if (!sched_allow_merge || blk_mq_sched_allow_merge(q, rq, bio))
|
||||
return bio_attempt_front_merge(rq, bio, nr_segs);
|
||||
break;
|
||||
case ELEVATOR_DISCARD_MERGE:
|
||||
|
Loading…
Reference in New Issue
Block a user