From: Christoph Hellwig Date: Fri, 5 Nov 2021 20:37:01 +0000 (-0700) Subject: mm: don't automatically unregister bdis X-Git-Tag: v6.1-rc5~2715^2~212 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=702f2d1e3b33617a8d9a9424f08a69b7c51642a7;p=platform%2Fkernel%2Flinux-starfive.git mm: don't automatically unregister bdis All BDI users now unregister explicitly. Link: https://lkml.kernel.org/r/20211021124441.668816-5-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/backing-dev.c b/mm/backing-dev.c index 8a46a0a..768e9ae 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c @@ -965,8 +965,7 @@ static void release_bdi(struct kref *ref) struct backing_dev_info *bdi = container_of(ref, struct backing_dev_info, refcnt); - if (test_bit(WB_registered, &bdi->wb.state)) - bdi_unregister(bdi); + WARN_ON_ONCE(test_bit(WB_registered, &bdi->wb.state)); WARN_ON_ONCE(bdi->dev); wb_exit(&bdi->wb); kfree(bdi);