Skip to content

Commit 24d796e

Browse files
committed
NFSD: Refactor nfsd4_cleanup_inter_ssc() (1/2)
The @src parameter is sometimes a pointer to a struct nfsd_file and sometimes a pointer to struct file hiding in a phony struct nfsd_file. Refactor nfsd4_cleanup_inter_ssc() so the @src parameter is always an explicit struct file. Signed-off-by: Chuck Lever <[email protected]>
1 parent 1913cdf commit 24d796e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

fs/nfsd/nfs4proc.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1554,7 +1554,7 @@ nfsd4_setup_inter_ssc(struct svc_rqst *rqstp,
15541554
}
15551555

15561556
static void
1557-
nfsd4_cleanup_inter_ssc(struct vfsmount *ss_mnt, struct nfsd_file *src,
1557+
nfsd4_cleanup_inter_ssc(struct vfsmount *ss_mnt, struct file *filp,
15581558
struct nfsd_file *dst)
15591559
{
15601560
bool found = false;
@@ -1563,9 +1563,9 @@ nfsd4_cleanup_inter_ssc(struct vfsmount *ss_mnt, struct nfsd_file *src,
15631563
struct nfsd4_ssc_umount_item *ni = NULL;
15641564
struct nfsd_net *nn = net_generic(dst->nf_net, nfsd_net_id);
15651565

1566-
nfs42_ssc_close(src->nf_file);
1566+
nfs42_ssc_close(filp);
15671567
nfsd_file_put(dst);
1568-
fput(src->nf_file);
1568+
fput(filp);
15691569

15701570
if (!nn) {
15711571
mntput(ss_mnt);
@@ -1608,7 +1608,7 @@ nfsd4_setup_inter_ssc(struct svc_rqst *rqstp,
16081608
}
16091609

16101610
static void
1611-
nfsd4_cleanup_inter_ssc(struct vfsmount *ss_mnt, struct nfsd_file *src,
1611+
nfsd4_cleanup_inter_ssc(struct vfsmount *ss_mnt, struct file *filp,
16121612
struct nfsd_file *dst)
16131613
{
16141614
}
@@ -1726,7 +1726,7 @@ static __be32 nfsd4_do_copy(struct nfsd4_copy *copy, bool sync)
17261726
}
17271727

17281728
if (nfsd4_ssc_is_inter(copy))
1729-
nfsd4_cleanup_inter_ssc(copy->ss_mnt, copy->nf_src,
1729+
nfsd4_cleanup_inter_ssc(copy->ss_mnt, copy->nf_src->nf_file,
17301730
copy->nf_dst);
17311731
else
17321732
nfsd4_cleanup_intra_ssc(copy->nf_src, copy->nf_dst);

0 commit comments

Comments
 (0)