summaryrefslogtreecommitdiffstats
path: root/lib/locking-selftest.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2015-07-02 02:53:37 +0200
committerJens Axboe <axboe@fb.com>2015-07-02 16:46:00 +0200
commita20135ffbc44545596f9b99c970de097fb497bdd (patch)
tree18d7267ad1c0b0d603b4ca9cb1e43755c344f632 /lib/locking-selftest.c
parentwriteback: don't embed root bdi_writeback_congested in bdi_writeback (diff)
downloadlinux-a20135ffbc44545596f9b99c970de097fb497bdd.tar.xz
linux-a20135ffbc44545596f9b99c970de097fb497bdd.zip
writeback: don't drain bdi_writeback_congested on bdi destruction
52ebea749aae ("writeback: make backing_dev_info host cgroup-specific bdi_writebacks") made bdi (backing_dev_info) host per-cgroup wb's (bdi_writeback's). As the congested state needs to be per-wb and referenced from blkcg side and multiple wbs, the patch made all non-root cong's (bdi_writeback_congested's) reference counted and indexed on bdi. When a bdi is destroyed, cgwb_bdi_destroy() tries to drain all non-root cong's; however, this can hang indefinitely because wb's can also be referenced from blkcg_gq's which are destroyed after bdi destruction is complete. This patch fixes the bug by updating bdi destruction to not wait for cong's to drain. A cong is unlinked from bdi->cgwb_congested_tree on bdi destuction regardless of its reference count as the bdi may go away any point after destruction. wb_congested_put() checks whether the cong is already unlinked on release. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Jon Christopherson <jon@jons.org> Link: https://bugzilla.kernel.org/show_bug.cgi?id=100681 Fixes: 52ebea749aae ("writeback: make backing_dev_info host cgroup-specific bdi_writebacks") Tested-by: Jon Christopherson <jon@jons.org> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'lib/locking-selftest.c')
0 files changed, 0 insertions, 0 deletions