summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Valente <paolo.valente@linaro.org>2020-03-21 12:45:19 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-23 11:36:26 +0300
commitad749ca022ad4b5165e636cc74695e43fa43f9b9 (patch)
treed38c49f6551b8f2cf048f585a31e07a154d1bb8a
parent00d3928737712c0dcfae6019693cb889dd8e8445 (diff)
downloadlinux-ad749ca022ad4b5165e636cc74695e43fa43f9b9.tar.xz
block, bfq: turn put_queue into release_process_ref in __bfq_bic_change_cgroup
commit c8997736650060594845e42c5d01d3118aec8d25 upstream. A bfq_put_queue() may be invoked in __bfq_bic_change_cgroup(). The goal of this put is to release a process reference to a bfq_queue. But process-reference releases may trigger also some extra operation, and, to this goal, are handled through bfq_release_process_ref(). So, turn the invocation of bfq_put_queue() into an invocation of bfq_release_process_ref(). Tested-by: cki-project@redhat.com Signed-off-by: Paolo Valente <paolo.valente@linaro.org> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--block/bfq-cgroup.c5
-rw-r--r--block/bfq-iosched.c2
-rw-r--r--block/bfq-iosched.h1
3 files changed, 2 insertions, 6 deletions
diff --git a/block/bfq-cgroup.c b/block/bfq-cgroup.c
index 5611769e1569..c90c4556bf44 100644
--- a/block/bfq-cgroup.c
+++ b/block/bfq-cgroup.c
@@ -697,10 +697,7 @@ static struct bfq_group *__bfq_bic_change_cgroup(struct bfq_data *bfqd,
if (entity->sched_data != &bfqg->sched_data) {
bic_set_bfqq(bic, NULL, 0);
- bfq_log_bfqq(bfqd, async_bfqq,
- "bic_change_group: %p %d",
- async_bfqq, async_bfqq->ref);
- bfq_put_queue(async_bfqq);
+ bfq_release_process_ref(bfqd, async_bfqq);
}
}
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index 5a825f9f1ea0..88497bff1135 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -2717,8 +2717,6 @@ static void bfq_bfqq_save_state(struct bfq_queue *bfqq)
}
}
-
-static
void bfq_release_process_ref(struct bfq_data *bfqd, struct bfq_queue *bfqq)
{
/*
diff --git a/block/bfq-iosched.h b/block/bfq-iosched.h
index 1553a4e8f7ad..c0232975075d 100644
--- a/block/bfq-iosched.h
+++ b/block/bfq-iosched.h
@@ -950,6 +950,7 @@ void bfq_bfqq_expire(struct bfq_data *bfqd, struct bfq_queue *bfqq,
bool compensate, enum bfqq_expiration reason);
void bfq_put_queue(struct bfq_queue *bfqq);
void bfq_end_wr_async_queues(struct bfq_data *bfqd, struct bfq_group *bfqg);
+void bfq_release_process_ref(struct bfq_data *bfqd, struct bfq_queue *bfqq);
void bfq_schedule_dispatch(struct bfq_data *bfqd);
void bfq_put_async_queues(struct bfq_data *bfqd, struct bfq_group *bfqg);