diff options
author | Dai Ngo <dai.ngo@oracle.com> | 2022-12-18 16:55:53 -0800 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2023-02-20 09:20:21 -0500 |
commit | df24ac7a2e3a9d0bc68f1756a880e50bfe4b4522 (patch) | |
tree | 98c6c8af145b6b734fdd08731c7913b6084f8ed6 /fs/nfsd/xdr4.h | |
parent | f4afc8fead386c81fda2593ad6162271d26667f8 (diff) | |
download | linux-stable-df24ac7a2e3a9d0bc68f1756a880e50bfe4b4522.tar.gz linux-stable-df24ac7a2e3a9d0bc68f1756a880e50bfe4b4522.tar.bz2 linux-stable-df24ac7a2e3a9d0bc68f1756a880e50bfe4b4522.zip |
NFSD: enhance inter-server copy cleanup
Currently nfsd4_setup_inter_ssc returns the vfsmount of the source
server's export when the mount completes. After the copy is done
nfsd4_cleanup_inter_ssc is called with the vfsmount of the source
server and it searches nfsd_ssc_mount_list for a matching entry
to do the clean up.
The problems with this approach are (1) the need to search the
nfsd_ssc_mount_list and (2) the code has to handle the case where
the matching entry is not found which looks ugly.
The enhancement is instead of nfsd4_setup_inter_ssc returning the
vfsmount, it returns the nfsd4_ssc_umount_item which has the
vfsmount embedded in it. When nfsd4_cleanup_inter_ssc is called
it's passed with the nfsd4_ssc_umount_item directly to do the
clean up so no searching is needed and there is no need to handle
the 'not found' case.
Signed-off-by: Dai Ngo <dai.ngo@oracle.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
[ cel: adjusted whitespace and variable/function names ]
Reviewed-by: Olga Kornievskaia <kolga@netapp.com>
Diffstat (limited to 'fs/nfsd/xdr4.h')
-rw-r--r-- | fs/nfsd/xdr4.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/xdr4.h b/fs/nfsd/xdr4.h index 4fd2cf6d1d2d..510978e602da 100644 --- a/fs/nfsd/xdr4.h +++ b/fs/nfsd/xdr4.h @@ -571,7 +571,7 @@ struct nfsd4_copy { struct task_struct *copy_task; refcount_t refcount; - struct vfsmount *ss_mnt; + struct nfsd4_ssc_umount_item *ss_nsui; struct nfs_fh c_fh; nfs4_stateid stateid; }; |