aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorWeston Andros Adamson <dros@netapp.com>2012-09-06 15:54:27 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-02 09:47:38 -0700
commit863f36bf5ad7edde2ec1196b098fec951fca16d3 (patch)
treead49d6e71c7f6ee5ca84941a6e61fa54f3c07776 /fs/nfs
parentd351ebe91e308cebfefc6808fd96a53c9d8f0c7b (diff)
downloadkernel_samsung_smdk4412-863f36bf5ad7edde2ec1196b098fec951fca16d3.zip
kernel_samsung_smdk4412-863f36bf5ad7edde2ec1196b098fec951fca16d3.tar.gz
kernel_samsung_smdk4412-863f36bf5ad7edde2ec1196b098fec951fca16d3.tar.bz2
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/nfs')
-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 fc97fd5..5fcc67b 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -5745,7 +5745,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)