]> git.baikalelectronics.ru Git - 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)
committerJ. Bruce Fields <bfields@redhat.com>
Mon, 29 Jun 2020 18:48:02 +0000 (14:48 -0400)
commit704cf66ad336faccbfe69370a7167445c80db904
treef9b3be891505d9420ca222fc14452bb7750315f5
parent4f74c5e14d117fd85afde692e5e4c2e35d36c395
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: dfaa4071f312 ("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