]> 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)
commit6c5f890a7dfa4e94f8cf9143b17632e6f65d1046
treef9b3be891505d9420ca222fc14452bb7750315f5
parent9e8f908451db41f4b62d7bdf7b6e0e66fa80a79e
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: 58c6b3bbdab8 ("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