diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-09-15 18:49:52 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-12-01 17:21:44 -0500 |
commit | 94e5c571fccb8eb551d3d5f5d163bf0c253a6ed8 (patch) | |
tree | 6c617e728ce6aff8f5003be492d672ec6843104d /fs/nfs/nfs4xdr.c | |
parent | 0cdc329ec9b150c165bcb603c4314b4031b24785 (diff) | |
download | linux-94e5c571fccb8eb551d3d5f5d163bf0c253a6ed8.tar.gz linux-94e5c571fccb8eb551d3d5f5d163bf0c253a6ed8.tar.xz |
pNFS: Get rid of unnecessary layout parameter in encode_layoutreturn callback
The parameter is already present in the "args" structure.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/nfs4xdr.c')
-rw-r--r-- | fs/nfs/nfs4xdr.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index b54931503872..86f72ae605c8 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c @@ -2013,6 +2013,7 @@ encode_layoutreturn(struct xdr_stream *xdr, const struct nfs4_layoutreturn_args *args, struct compound_hdr *hdr) { + const struct pnfs_layoutdriver_type *lr_ops = NFS_SERVER(args->inode)->pnfs_curr_ld; __be32 *p; encode_op_hdr(xdr, OP_LAYOUTRETURN, decode_layoutreturn_maxsz, hdr); @@ -2027,10 +2028,9 @@ encode_layoutreturn(struct xdr_stream *xdr, spin_lock(&args->inode->i_lock); encode_nfs4_stateid(xdr, &args->stateid); spin_unlock(&args->inode->i_lock); - if (NFS_SERVER(args->inode)->pnfs_curr_ld->encode_layoutreturn) { - NFS_SERVER(args->inode)->pnfs_curr_ld->encode_layoutreturn( - NFS_I(args->inode)->layout, xdr, args); - } else + if (lr_ops->encode_layoutreturn) + lr_ops->encode_layoutreturn(xdr, args); + else encode_uint32(xdr, 0); } |