Skip to content

Commit

Permalink
NFSv4.2: Fix up a decoding error in layoutstats
Browse files Browse the repository at this point in the history
According to the spec, the server is only returning the status,
which we decode in the op header.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
  • Loading branch information
Trond Myklebust committed Jun 27, 2015
1 parent d620876 commit da2e812
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions fs/nfs/nfs42xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,23 +241,7 @@ static int decode_seek(struct xdr_stream *xdr, struct nfs42_seek_res *res)
static int decode_layoutstats(struct xdr_stream *xdr,
struct nfs42_layoutstat_res *res)
{
int status;
__be32 *p;

status = decode_op_hdr(xdr, OP_LAYOUTSTATS);
if (status)
return status;

p = xdr_inline_decode(xdr, 4);
if (unlikely(!p))
goto out_overflow;

res->rpc_status = be32_to_cpup(p++);
return 0;

out_overflow:
print_overflow_msg(__func__, xdr);
return -EIO;
return decode_op_hdr(xdr, OP_LAYOUTSTATS);
}

/*
Expand Down

0 comments on commit da2e812

Please sign in to comment.