nfsd: fix nfsdfs inode reference count leak
authorJ. Bruce Fields <bfields@redhat.com>
Wed, 24 Jun 2020 01:01:19 +0000 (21:01 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Mon, 29 Jun 2020 18:48:28 +0000 (14:48 -0400)
I don't understand this code well, but  I'm seeing a warning about a
still-referenced inode on unmount, and every other similar filesystem
does a dput() here.

Fixes: e8a79fb14f6b ("nfsd: add nfsd/clients directory")
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfsctl.c

index cf98a81..cd05732 100644 (file)
@@ -1335,6 +1335,7 @@ void nfsd_client_rmdir(struct dentry *dentry)
        WARN_ON_ONCE(ret);
        fsnotify_rmdir(dir, dentry);
        d_delete(dentry);
+       dput(dentry);
        inode_unlock(dir);
 }