]> git.ipfire.org Git - thirdparty/linux.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)
committerJ. Bruce Fields <bfields@redhat.com>
Mon, 29 Jun 2020 18:48:02 +0000 (14:48 -0400)
commit681370f4b00af0fcc65bbfb9f82de526ab7ceb0a
treef9b3be891505d9420ca222fc14452bb7750315f5
parent22cf8419f1319ff87ec759d0ebdff4cbafaee832
nfsd4: fix nfsdfs reference count loop

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>
fs/nfsd/nfs4state.c
fs/nfsd/nfsctl.c
fs/nfsd/nfsd.h