]> www.infradead.org Git - users/jedix/linux-maple.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)
committerGuangyu Sun <guangyu.sun@oracle.com>
Mon, 8 Oct 2012 17:00:15 +0000 (10:00 -0700)
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>
Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
fs/nfs/nfs4xdr.c

index 1cce3ac3a4692228b07bc61f481983e1503bd7ca..3b7fb28b44b5fddeecd69090c19765f00048b0fe 100644 (file)
@@ -5757,7 +5757,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) != 0)
                goto out;