From: Weston Andros Adamson Date: Thu, 6 Sep 2012 19:54:27 +0000 (-0400) Subject: NFS: return error from decode_getfh in decode open X-Git-Tag: v3.2.30~19 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2971abeb4ad7000b3ca8f5beca598eeea3f03a22;p=thirdparty%2Fkernel%2Fstable.git 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 Signed-off-by: Trond Myklebust Signed-off-by: Ben Hutchings --- diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index bdd5bdca76a7d..00818c8588eb4 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)