diff options
author | Weston Andros Adamson <dros@netapp.com> | 2012-09-06 15:54:27 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-09-06 16:01:33 -0400 |
commit | 01913b49cf1dc6409a07dd2a4cc6af2e77f3c410 (patch) | |
tree | 973b1b0ea34c8c809922f84f8941905053142b6f /fs/nfs | |
parent | 1f1ea6c2d9d8c0be9ec56454b05315273b5de8ce (diff) | |
download | op-kernel-dev-01913b49cf1dc6409a07dd2a4cc6af2e77f3c410.zip op-kernel-dev-01913b49cf1dc6409a07dd2a4cc6af2e77f3c410.tar.gz |
NFS: return error from decode_getfh in decode open
If decode_getfh failed, nfs4_xdr_dec_open would return 0 since the last
decode_* call must have succeeded.
Cc: stable@vger.kernel.org
Signed-off-by: Weston Andros Adamson <dros@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/nfs4xdr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 541e796..8dba6bd 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c @@ -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: |