Commit 9718c59c authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Linus Torvalds
Browse files

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: 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 c6fd3ac0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);
}