Commit d009117f authored by Dai Ngo's avatar Dai Ngo Committed by Wen Zhiwei
Browse files

NFSD: initialize copy->cp_clp early in nfsd4_copy for use by trace point

stable inclusion
from stable-v6.6.63
commit 74115b3e41c7ed88d53dce9c6091b38c02de02f9
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IBI1RP

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=74115b3e41c7ed88d53dce9c6091b38c02de02f9



--------------------------------

[ Upstream commit 15d1975b7279693d6f09398e0e2e31aca2310275 ]

Prepare for adding server copy trace points.

Signed-off-by: default avatarDai Ngo <dai.ngo@oracle.com>
Tested-by: default avatarChen Hanxiao <chenhx.fnst@fujitsu.com>
Stable-dep-of: 9ed666eba4e0 ("NFSD: Async COPY result needs to return a write verifier")
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarWen Zhiwei <wenzhiwei@kylinos.cn>
parent 5d3bcb34
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1799,6 +1799,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;
@@ -1813,7 +1814,6 @@ nfsd4_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
			return status;
	}

	copy->cp_clp = cstate->clp;
	memcpy(&copy->fh, &cstate->current_fh.fh_handle,
		sizeof(struct knfsd_fh));
	if (nfsd4_copy_is_async(copy)) {