summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWeston Andros Adamson <dros@netapp.com>2012-09-06 15:54:27 -0400
committerBen Hutchings <ben@decadent.org.uk>2012-09-19 15:05:17 +0100
commit2971abeb4ad7000b3ca8f5beca598eeea3f03a22 (patch)
tree69a9ec71d3c60a1c45dd214d385610266f888253
parentd9a6b7d813f592d6d8738418bc396eeaea65467c (diff)
NFS: return error from decode_getfh in decode open
commit 01913b49cf1dc6409a07dd2a4cc6af2e77f3c410 upstream. If decode_getfh failed, nfs4_xdr_dec_open would return 0 since the last decode_* call must have succeeded. Signed-off-by: Weston Andros Adamson <dros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r--fs/nfs/nfs4xdr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index bdd5bdca76a7..00818c8588eb 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -6113,7 +6113,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;
if (decode_getfattr(xdr, res->f_attr, res->server,
!RPC_IS_ASYNC(rqstp->rq_task)) != 0)