]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
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 cf98a81ca1ea01872e4c0a0824fe000f7bd16f69..cd05732f8eaa84672a85a867a5a8414a52bf65ac 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);
 }