Skip to content

Commit 614c975

Browse files
olgakorn1chucklever
authored andcommitted
NFSD: fix dest to src mount in inter-server COPY
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: 36e1e5b ("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>
1 parent 6ee65a7 commit 614c975

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/nfsd/nfs4proc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1302,7 +1302,7 @@ nfsd4_cleanup_inter_ssc(struct vfsmount *ss_mnt, struct nfsd_file *src,
13021302
struct nfsd_file *dst)
13031303
{
13041304
nfs42_ssc_close(src->nf_file);
1305-
/* 'src' is freed by nfsd4_do_async_copy */
1305+
fput(src->nf_file);
13061306
nfsd_file_put(dst);
13071307
mntput(ss_mnt);
13081308
}

0 commit comments

Comments
 (0)