@@ -2740,7 +2740,7 @@ static struct bfq_queue *bfq_find_close_cooperator(struct bfq_data *bfqd,
static struct bfq_queue *
bfq_setup_merge(struct bfq_queue *bfqq, struct bfq_queue *new_bfqq)
{
- int process_refs, new_process_refs;
+ int process_refs;
/*
* If there are no process references on the new_bfqq, then it is
@@ -2758,12 +2758,11 @@ bfq_setup_merge(struct bfq_queue *bfqq, struct bfq_queue *new_bfqq)
}
process_refs = bfqq_process_refs(bfqq);
- new_process_refs = bfqq_process_refs(new_bfqq);
/*
* If the process for the bfqq has gone away, there is no
* sense in merging the queues.
*/
- if (process_refs == 0 || new_process_refs == 0)
+ if (process_refs == 0)
return NULL;
/*
As we already check process_refs of original new_bfqq is not zero. The later new_bfqq maybe the merged queue of original new_bfqq which inherit the process_refs of original new_bfqq which is not zero, so process_refs of merged queue will not be zero. Remove unncessary check for merged queue and remove new_process_refs which will not be used. Signed-off-by: Kemeng Shi <shikemeng@huawei.com> --- block/bfq-iosched.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)