Skip to content

Commit 01913b4

Browse files
westonandrosadamsonTrond Myklebust
authored andcommitted
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>
1 parent 1f1ea6c commit 01913b4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎fs/nfs/nfs4xdr.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6225,7 +6225,8 @@ static int nfs4_xdr_dec_open(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
62256225
status = decode_open(xdr, res);
62266226
if (status)
62276227
goto out;
6228-
if (decode_getfh(xdr, &res->fh) != 0)
6228+
status = decode_getfh(xdr, &res->fh);
6229+
if (status)
62296230
goto out;
62306231
decode_getfattr(xdr, res->f_attr, res->server);
62316232
out:

0 commit comments

Comments
 (0)