Skip to content

Commit

Permalink
NFSv42: Don't fail clone() unless the OP_CLONE operation failed
Browse files Browse the repository at this point in the history
The failure to retrieve post-op attributes has no bearing on whether or
not the clone operation itself was successful. We must therefore ignore
the return value of decode_getfattr() when looking at the success or
failure of nfs4_xdr_dec_clone().

Fixes: 3602277 ("nfs42: add CLONE xdr functions")
Signed-off-by: Trond Myklebust <[email protected]>
  • Loading branch information
Trond Myklebust committed Nov 17, 2021
1 parent f96f8cc commit d3c4582
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/nfs/nfs42xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1434,8 +1434,7 @@ static int nfs4_xdr_dec_clone(struct rpc_rqst *rqstp,
status = decode_clone(xdr);
if (status)
goto out;
status = decode_getfattr(xdr, res->dst_fattr, res->server);

decode_getfattr(xdr, res->dst_fattr, res->server);
out:
res->rpc_status = status;
return status;
Expand Down

0 comments on commit d3c4582

Please sign in to comment.