]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
NFS: return error from decode_getfh in decode open
authorWeston Andros Adamson <dros@netapp.com>
Thu, 6 Sep 2012 19:54:27 +0000 (15:54 -0400)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 19 Sep 2012 14:05:17 +0000 (15:05 +0100)
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>
fs/nfs/nfs4xdr.c

index bdd5bdca76a7d19fb0299dcfd7f4d09679eebcbb..00818c8588eb49aaa2d8d3c9f21ba1c6db7cf091 100644 (file)
@@ -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)