aboutsummaryrefslogtreecommitdiff
path: root/fs/nfs/flexfilelayout/flexfilelayout.c
diff options
context:
space:
mode:
authorTrond Myklebust <[email protected]>2017-02-19 16:08:26 -0500
committerAnna Schumaker <[email protected]>2017-02-21 16:56:16 -0500
commitab6e9aaf16cfdfca630f9745fd6d453818df7f64 (patch)
tree0518bb63cde9902f4686eea336d665f38aee182d /fs/nfs/flexfilelayout/flexfilelayout.c
parent0ae060ca2bdfe11181094699b0f76437ec210b17 (diff)
NFSv4: Replace ad-hoc xdr encode/decode helpers with xdr_stream_* generics
Signed-off-by: Trond Myklebust <[email protected]> Reviewed-by: Chuck Lever <[email protected]> Signed-off-by: Anna Schumaker <[email protected]>
Diffstat (limited to 'fs/nfs/flexfilelayout/flexfilelayout.c')
-rw-r--r--fs/nfs/flexfilelayout/flexfilelayout.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c
index 6104696325be..7b5f37f5ddf1 100644
--- a/fs/nfs/flexfilelayout/flexfilelayout.c
+++ b/fs/nfs/flexfilelayout/flexfilelayout.c
@@ -1949,10 +1949,7 @@ static int ff_layout_encode_ioerr(struct xdr_stream *xdr,
static void
encode_opaque_fixed(struct xdr_stream *xdr, const void *buf, size_t len)
{
- __be32 *p;
-
- p = xdr_reserve_space(xdr, len);
- xdr_encode_opaque_fixed(p, buf, len);
+ WARN_ON_ONCE(xdr_stream_encode_opaque_fixed(xdr, buf, len) < 0);
}
static void