Re: [PATCH 2/2] erofs: remove unnecessary kobject_del()
From: Yangtao Li
Date: Thu Apr 06 2023 - 05:41:48 EST
HI Gao Xiang,
> Would you mind taking a look at
> commit a942da24abc5 ("fs: erofs: add sanity check for kobject in erofs_unregister_sysfs")
>
> , which could be "git-blame"ed (I'd suggest looking into these
> blame first), and the related discussion was:
>
> https://lore.kernel.org/r/CAD-N9QXNx=p3-QoWzk6pCznF32CZy8kM3vvo8mamfZZ9CpUKdw@xxxxxxxxxxxxxx
> https://lore.kernel.org/r/20220315075152.63789-1-dzm91@xxxxxxxxxxx
> TL;DR: I guess it could be fixed as below if kobject_del() could
> : be killed safely:
>
> if (sbi->s_kobj.state_in_sysfs) {
> kobject_put(&sbi->s_kobj);
> wait_for_completion(&sbi->s_kobj_unregister);
> }
Thanks for your review and detailed explanation.
MBR,
Yangtao