diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-11 12:34:39 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-11 13:04:54 +0300 |
commit | 7c394c2240311f088241dcc350bf3815dae75b70 (patch) | |
tree | 688da3f91b7a7ca7dc812ba9baf59135cb7846d5 /block | |
parent | 083b58373463a6e5ee60ecb135269348f68ad7df (diff) | |
download | linux-7c394c2240311f088241dcc350bf3815dae75b70.tar.xz |
Revert "blk-cgroup: dropping parent refcount after pd_free_fn() is done"
This reverts commit 57a425badc05c2e87e9f25713e5c3c0298e4202c which is
commit c7241babf0855d8a6180cd1743ff0ec34de40b4e upstream.
It is reported to cause problems, as only 2 of the 3 patch series were
applied to the stable branches.
Reported-by: Mike Cloaked <mike.cloaked@gmail.com>
Reported-by: Eric Biggers <ebiggers@kernel.org>
Cc: Yu Kuai <yukuai3@huawei.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Sasha Levin <sashal@kernel.org>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=217174
Link: https://lore.kernel.org/r/ZAuPkCn49urWBN5P@sol.localdomain
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-cgroup.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index aa890e3e4e50..9ac1efb053e0 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -124,8 +124,6 @@ static void blkg_free_workfn(struct work_struct *work) if (blkg->pd[i]) blkcg_policy[i]->pd_free_fn(blkg->pd[i]); - if (blkg->parent) - blkg_put(blkg->parent); if (blkg->q) blk_put_queue(blkg->q); free_percpu(blkg->iostat_cpu); @@ -160,6 +158,8 @@ static void __blkg_release(struct rcu_head *rcu) /* release the blkcg and parent blkg refs this blkg has been holding */ css_put(&blkg->blkcg->css); + if (blkg->parent) + blkg_put(blkg->parent); blkg_free(blkg); } |