Commit bfe129b4 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] kNFSd: Miscellaneous fixes to stateid-based replay

From: NeilBrown <neilb@cse.unsw.edu.au>

Save replays for LOCK operations, make sure errors are replayed correctly.
parent 2563540f
......@@ -776,6 +776,7 @@ nfsd4_proc_compound(struct svc_rqst *rqstp,
break;
case OP_LOCK:
op->status = nfsd4_lock(rqstp, &current_fh, &op->u.lock);
op->replay = &op->u.lock.lk_stateowner->so_replay;
break;
case OP_LOCKT:
op->status = nfsd4_lockt(rqstp, &current_fh, &op->u.lockt);
......@@ -864,7 +865,7 @@ nfsd4_proc_compound(struct svc_rqst *rqstp,
encode_op:
if (op->status == NFSERR_REPLAY_ME) {
nfsd4_encode_replay(resp, op);
status = op->status = NFS_OK;
status = op->status = op->replay->rp_status;
} else {
nfsd4_encode_operation(resp, op);
status = op->status;
......
......@@ -2399,7 +2399,7 @@ nfsd4_encode_replay(struct nfsd4_compoundres *resp, struct nfsd4_op *op)
RESERVE_SPACE(8);
WRITE32(op->opnum);
WRITE32(NFS_OK);
*p++ = rp->rp_status; /* already xdr'ed */
ADJUST_ARGS();
RESERVE_SPACE(rp->rp_buflen);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment