Commit 01913b49 authored by Weston Andros Adamson's avatar Weston Andros Adamson Committed by Trond Myklebust

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: default avatarWeston Andros Adamson <dros@netapp.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 1f1ea6c2
...@@ -6225,7 +6225,8 @@ static int nfs4_xdr_dec_open(struct rpc_rqst *rqstp, struct xdr_stream *xdr, ...@@ -6225,7 +6225,8 @@ static int nfs4_xdr_dec_open(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
status = decode_open(xdr, res); status = decode_open(xdr, res);
if (status) if (status)
goto out; goto out;
if (decode_getfh(xdr, &res->fh) != 0) status = decode_getfh(xdr, &res->fh);
if (status)
goto out; goto out;
decode_getfattr(xdr, res->f_attr, res->server); decode_getfattr(xdr, res->f_attr, res->server);
out: out:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment