Blob Blame History Raw
From: "J. Bruce Fields" <bfields@redhat.com>
Date: Tue, 23 Jun 2020 21:01:19 -0400
Subject: [PATCH] nfsd: fix nfsdfs inode reference count leak
Git-commit: bf2654017e0268cc83dc88d56f0e67ff4406631d
Patch-mainline: v5.8-rc4
References: git-fixes

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>
Acked-by: NeilBrown <neilb@suse.com>

---
 fs/nfsd/nfsctl.c |    1 +
 1 file changed, 1 insertion(+)

--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -1335,6 +1335,7 @@ void nfsd_client_rmdir(struct dentry *de
 	WARN_ON_ONCE(ret);
 	fsnotify_rmdir(dir, dentry);
 	d_delete(dentry);
+	dput(dentry);
 	inode_unlock(dir);
 }