Skip to content

Commit

Permalink
NFS: return error from decode_getfh in decode open
Browse files Browse the repository at this point in the history
If decode_getfh failed, nfs4_xdr_dec_open would return 0 since the last
decode_* call must have succeeded.

Cc: [email protected]
Signed-off-by: Weston Andros Adamson <[email protected]>
Signed-off-by: Trond Myklebust <[email protected]>
  • Loading branch information
westonandrosadamson authored and Trond Myklebust committed Sep 6, 2012
1 parent 1f1ea6c commit 01913b4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/nfs/nfs4xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -6225,7 +6225,8 @@ static int nfs4_xdr_dec_open(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
status = decode_open(xdr, res);
if (status)
goto out;
if (decode_getfh(xdr, &res->fh) != 0)
status = decode_getfh(xdr, &res->fh);
if (status)
goto out;
decode_getfattr(xdr, res->f_attr, res->server);
out:
Expand Down

0 comments on commit 01913b4

Please sign in to comment.