]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
nfsd4: fix nfsdfs reference count loop
authorJ. Bruce Fields <bfields@redhat.com>
Tue, 23 Jun 2020 20:00:33 +0000 (16:00 -0400)
committerKhalid Elmously <khalid.elmously@canonical.com>
Sat, 8 Aug 2020 05:53:12 +0000 (01:53 -0400)
commit26bdab31b1fb769b72e3cdbb4519be0776105d28
treeef748d34f0d44d1c919a476aca2e8170f69b872c
parentadd8559d14ee5d40dd1bc1fce2845ceece09f25e
nfsd4: fix nfsdfs reference count loop

BugLink: https://bugs.launchpad.net/bugs/1886995
[ Upstream commit 681370f4b00af0fcc65bbfb9f82de526ab7ceb0a ]

We don't drop the reference on the nfsdfs filesystem with
mntput(nn->nfsd_mnt) until nfsd_exit_net(), but that won't be called
until the nfsd module's unloaded, and we can't unload the module as long
as there's a reference on nfsdfs.  So this prevents module unloading.

Fixes: 2c830dd7209b ("nfsd: persist nfsd filesystem across mounts")
Reported-and-Tested-by: Luo Xiaogang <lxgrxd@163.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
fs/nfsd/nfs4state.c
fs/nfsd/nfsctl.c
fs/nfsd/nfsd.h