On 06.08.2019 12:35, Konstantin Khorenko wrote: > The commit is pushed to "branch-rh7-3.10.0-957.21.3.vz7.106.x-ovz" and will > appear at https://src.openvz.org/scm/ovz/vzkernel.git > after rh7-3.10.0-957.21.3.vz7.106.7 > ------> > commit 160e886e8adc095ac9f01420f66962732ee9683d > Author: Andrey Ryabinin <[email protected]> > Date: Tue Aug 6 12:35:45 2019 +0300 > > nfs: skip bdi_unregister() if inodes are leaked. > > https://jira.sw.ru/browse/PSBM-95177 > Signed-off-by: Andrey Ryabinin <[email protected]> > --- > fs/nfs/super.c | 3 +++ > fs/super.c | 3 ++- > 2 files changed, 5 insertions(+), 1 deletion(-) > > diff --git a/fs/nfs/super.c b/fs/nfs/super.c > index 64b52b7188c9..f9c0a02c25af 100644 > --- a/fs/nfs/super.c > +++ b/fs/nfs/super.c > @@ -2711,6 +2711,9 @@ void nfs_put_super(struct super_block *s) > { > struct nfs_server *server = NFS_SB(s); > > + if (!list_empty(&s->s_inodes)) > + pr_err("nfs_put_super: busy inodes skip bdi_unregister\n"); > + > bdi_unregister(&server->backing_dev_info); > } > EXPORT_SYMBOL_GPL(nfs_put_super); > diff --git a/fs/super.c b/fs/super.c > index f131d14587ca..e5551b8462a8 100644 > --- a/fs/super.c > +++ b/fs/super.c > @@ -1046,7 +1046,8 @@ void kill_anon_super(struct super_block *sb) > { > dev_t dev = sb->s_dev; > generic_shutdown_super(sb); > - free_anon_bdev(dev); > + if (!list_empty(&sb->s_inodes)) > + free_anon_bdev(dev); > }
I do not understand this part. free_anon_bdev(dev) will be called here only if there are leaked inodes (!list_empty(&sb->s_inodes) is true). Perhaps, the intention was to call free_anon_bdev(dev) only if there are *no* leaked inodes instead? Or? > > EXPORT_SYMBOL(kill_anon_super); > > _______________________________________________ > Devel mailing list > [email protected] > https://lists.openvz.org/mailman/listinfo/devel > . > _______________________________________________ Devel mailing list [email protected] https://lists.openvz.org/mailman/listinfo/devel
