Message ID | 20211231032354.793092-4-yukuai3@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | block, bfq: minor cleanup and fix | expand |
diff --git a/block/bfq-cgroup.c b/block/bfq-cgroup.c index 5e65b0407e85..22dd5b7229ae 100644 --- a/block/bfq-cgroup.c +++ b/block/bfq-cgroup.c @@ -654,6 +654,12 @@ void bfq_bfqq_move(struct bfq_data *bfqd, struct bfq_queue *bfqq, if (old_parent == bfqg) return; + /* + * oom_bfqq is not allowed to move, oom_bfqq will hold ref to root_group + * until elevator exit. + */ + if (bfqq == &bfqd->oom_bfqq) + return; /* * Get extra reference to prevent bfqq from being freed in * next possible expire or deactivate.