From: Dai Ngo Date: Tue, 19 Nov 2024 00:47:28 +0000 (-0500) Subject: NFSD: initialize copy->cp_clp early in nfsd4_copy for use by trace point X-Git-Tag: v5.10.231~433 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7f9b91ed15df94170ffafdb953a3f0a3fd0362ad;p=thirdparty%2Fkernel%2Fstable.git NFSD: initialize copy->cp_clp early in nfsd4_copy for use by trace point [ Upstream commit 15d1975b7279693d6f09398e0e2e31aca2310275 ] Prepare for adding server copy trace points. Signed-off-by: Dai Ngo Tested-by: Chen Hanxiao Stable-dep-of: 9ed666eba4e0 ("NFSD: Async COPY result needs to return a write verifier") Signed-off-by: Chuck Lever Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index f10e70f372855..fbd42c1a3fcd3 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -1769,6 +1769,7 @@ nfsd4_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, __be32 status; struct nfsd4_copy *async_copy = NULL; + copy->cp_clp = cstate->clp; if (nfsd4_ssc_is_inter(copy)) { if (!inter_copy_offload_enable || nfsd4_copy_is_sync(copy)) { status = nfserr_notsupp; @@ -1783,7 +1784,6 @@ nfsd4_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, return status; } - copy->cp_clp = cstate->clp; memcpy(©->fh, &cstate->current_fh.fh_handle, sizeof(struct knfsd_fh)); if (nfsd4_copy_is_async(copy)) {