diff mbox series

[2/5] mtd: call bdi_unregister explicitly

Message ID 20211021124441.668816-3-hch@lst.de (mailing list archive)
State New
Headers show
Series [1/5] mm: export bdi_unregister | expand

Commit Message

Christoph Hellwig Oct. 21, 2021, 12:44 p.m. UTC
Call bdi_unregister explicitly instead of relying on the automatic
unregistration.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/mtd/mtdcore.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Jan Kara Oct. 22, 2021, 8:43 a.m. UTC | #1
On Thu 21-10-21 14:44:38, Christoph Hellwig wrote:
> Call bdi_unregister explicitly instead of relying on the automatic
> unregistration.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Looks good. Feel free to add:

Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
>  drivers/mtd/mtdcore.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
> index c8fd7f758938b..c904e23c82379 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);
>  }
> -- 
> 2.30.2
>
diff mbox series

Patch

diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index c8fd7f758938b..c904e23c82379 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);
 }