Commit 702f2d1e authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Linus Torvalds

mm: don't automatically unregister bdis

All BDI users now unregister explicitly.

Link: https://lkml.kernel.org/r/20211021124441.668816-5-hch@lst.deSigned-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 0b3ea092
...@@ -965,8 +965,7 @@ static void release_bdi(struct kref *ref) ...@@ -965,8 +965,7 @@ static void release_bdi(struct kref *ref)
struct backing_dev_info *bdi = struct backing_dev_info *bdi =
container_of(ref, struct backing_dev_info, refcnt); container_of(ref, struct backing_dev_info, refcnt);
if (test_bit(WB_registered, &bdi->wb.state)) WARN_ON_ONCE(test_bit(WB_registered, &bdi->wb.state));
bdi_unregister(bdi);
WARN_ON_ONCE(bdi->dev); WARN_ON_ONCE(bdi->dev);
wb_exit(&bdi->wb); wb_exit(&bdi->wb);
kfree(bdi); kfree(bdi);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment