Unverified Commit 38884ed0 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!13356 NFSD: Initialize struct nfsd4_copy earlier

parents 81248561 81cbffdc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1529,6 +1529,7 @@ nfsd4_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
		if (!async_copy)
			goto out_err;
		async_copy->cp_nn = nn;
		refcount_set(&async_copy->refcount, 1);
		/* Arbitrary cap on number of pending async copy operations */
		if (atomic_inc_return(&nn->pending_async_copies) >
				(int)rqstp->rq_pool->sp_nrthreads) {
@@ -1537,7 +1538,6 @@ nfsd4_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
		}
		if (!nfs4_init_copy_state(nn, copy))
			goto out_err;
		refcount_set(&async_copy->refcount, 1);
		memcpy(&copy->cp_res.cb_stateid, &copy->cp_stateid.stid,
			sizeof(copy->cp_res.cb_stateid));
		dup_copy_fields(copy, async_copy);