NFSD: fix dest to src mount in inter-server COPY
authorOlga Kornievskaia <kolga@netapp.com>
Tue, 9 Mar 2021 14:41:14 +0000 (09:41 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Mar 2021 08:04:08 +0000 (09:04 +0100)
commit982b899ba672c1eb2e0c01fef197bda13de4af55
treee0666cf433ae129a0c99a584bf9631f657b3824c
parent800369d61add0216a72b4c433c246832b28a790e
NFSD: fix dest to src mount in inter-server COPY

commit 614c9750173e412663728215152cc6d12bcb3425 upstream.

A cleanup of the inter SSC copy needs to call fput() of the source
file handle to make sure that file structure is freed as well as
drop the reference on the superblock to unmount the source server.

Fixes: 36e1e5ba90fb ("NFSD: Fix use-after-free warning when doing inter-server copy")
Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Tested-by: Dai Ngo <dai.ngo@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfsd/nfs4proc.c