summaryrefslogtreecommitdiffstats
path: root/block/blk-core.c
diff options
context:
space:
mode:
authorPaolo Valente <paolo.valente@linaro.org>2018-05-31 16:48:05 +0200
committerJens Axboe <axboe@kernel.dk>2018-05-31 16:48:05 +0200
commit8abfa4d6fd1537a570d99c52e9a683b759c27a45 (patch)
tree9168c6fb860774105a29283bae366264fe03ab13 /block/blk-core.c
parentblock, bfq: remove wrong lock in bfq_requests_merged (diff)
downloadlinux-8abfa4d6fd1537a570d99c52e9a683b759c27a45.tar.xz
linux-8abfa4d6fd1537a570d99c52e9a683b759c27a45.zip
block, bfq: remove wrong check in bfq_requests_merged
The request rq passed to the function bfq_requests_merged is always in a bfq_queue, so the check !RB_EMPTY_NODE(&rq->rb_node) at the beginning of bfq_requests_merged always succeeds, and the control flow systematically skips to the end of the function. This implies that the body of the function is never executed, i.e., the repositioning of rq is never performed. On the opposite end, a control is missing in the body of the function: 'next' must be removed only if it is inside a bfq_queue. This commit removes the wrong check on rq, and adds the missing check on 'next'. In addition, this commit adds comments on bfq_requests_merged. Signed-off-by: Filippo Muzzini <filippo.muzzini@outlook.it> Signed-off-by: Paolo Valente <paolo.valente@linaro.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-core.c')
0 files changed, 0 insertions, 0 deletions