summaryrefslogtreecommitdiff
path: root/drivers/mtd/mtdcore.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-11-05 23:36:55 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2021-11-06 23:30:34 +0300
commit9718c59c0a1604350c06ffd87d598f03dcf5e9ca (patch)
tree082fa10c824d07db56049ec22f7bd79a5dfc6251 /drivers/mtd/mtdcore.c
parentc6fd3ac0fc859da57404c3bad64696d48a6f425e (diff)
downloadlinux-9718c59c0a1604350c06ffd87d598f03dcf5e9ca.tar.xz
mtd: call bdi_unregister explicitly
Call bdi_unregister explicitly instead of relying on the automatic unregistration. Link: https://lkml.kernel.org/r/20211021124441.668816-3-hch@lst.de Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jan 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: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/mtd/mtdcore.c')
-rw-r--r--drivers/mtd/mtdcore.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index c8fd7f758938..c904e23c8237 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -2409,6 +2409,7 @@ static void __exit cleanup_mtd(void)
if (proc_mtd)
remove_proc_entry("mtd", NULL);
class_unregister(&mtd_class);
+ bdi_unregister(mtd_bdi);
bdi_put(mtd_bdi);
idr_destroy(&mtd_idr);
}