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>
This commit is contained in:
parent
0cdc329ec9
commit
94e5c571fc
|
@ -2012,10 +2012,10 @@ ff_layout_alloc_deviceid_node(struct nfs_server *server,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ff_layout_encode_layoutreturn(struct pnfs_layout_hdr *lo,
|
ff_layout_encode_layoutreturn(struct xdr_stream *xdr,
|
||||||
struct xdr_stream *xdr,
|
|
||||||
const struct nfs4_layoutreturn_args *args)
|
const struct nfs4_layoutreturn_args *args)
|
||||||
{
|
{
|
||||||
|
struct pnfs_layout_hdr *lo = args->layout;
|
||||||
struct nfs4_flexfile_layout *flo = FF_LAYOUT_FROM_HDR(lo);
|
struct nfs4_flexfile_layout *flo = FF_LAYOUT_FROM_HDR(lo);
|
||||||
__be32 *start;
|
__be32 *start;
|
||||||
|
|
||||||
|
|
|
@ -2013,6 +2013,7 @@ encode_layoutreturn(struct xdr_stream *xdr,
|
||||||
const struct nfs4_layoutreturn_args *args,
|
const struct nfs4_layoutreturn_args *args,
|
||||||
struct compound_hdr *hdr)
|
struct compound_hdr *hdr)
|
||||||
{
|
{
|
||||||
|
const struct pnfs_layoutdriver_type *lr_ops = NFS_SERVER(args->inode)->pnfs_curr_ld;
|
||||||
__be32 *p;
|
__be32 *p;
|
||||||
|
|
||||||
encode_op_hdr(xdr, OP_LAYOUTRETURN, decode_layoutreturn_maxsz, hdr);
|
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);
|
spin_lock(&args->inode->i_lock);
|
||||||
encode_nfs4_stateid(xdr, &args->stateid);
|
encode_nfs4_stateid(xdr, &args->stateid);
|
||||||
spin_unlock(&args->inode->i_lock);
|
spin_unlock(&args->inode->i_lock);
|
||||||
if (NFS_SERVER(args->inode)->pnfs_curr_ld->encode_layoutreturn) {
|
if (lr_ops->encode_layoutreturn)
|
||||||
NFS_SERVER(args->inode)->pnfs_curr_ld->encode_layoutreturn(
|
lr_ops->encode_layoutreturn(xdr, args);
|
||||||
NFS_I(args->inode)->layout, xdr, args);
|
else
|
||||||
} else
|
|
||||||
encode_uint32(xdr, 0);
|
encode_uint32(xdr, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -504,10 +504,10 @@ encode_accumulated_error(struct objlayout *objlay, __be32 *p)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
objlayout_encode_layoutreturn(struct pnfs_layout_hdr *pnfslay,
|
objlayout_encode_layoutreturn(struct xdr_stream *xdr,
|
||||||
struct xdr_stream *xdr,
|
|
||||||
const struct nfs4_layoutreturn_args *args)
|
const struct nfs4_layoutreturn_args *args)
|
||||||
{
|
{
|
||||||
|
struct pnfs_layout_hdr *pnfslay = args->layout;
|
||||||
struct objlayout *objlay = OBJLAYOUT(pnfslay);
|
struct objlayout *objlay = OBJLAYOUT(pnfslay);
|
||||||
struct objlayout_io_res *oir, *tmp;
|
struct objlayout_io_res *oir, *tmp;
|
||||||
__be32 *start;
|
__be32 *start;
|
||||||
|
|
|
@ -175,7 +175,6 @@ extern void objlayout_encode_layoutcommit(
|
||||||
const struct nfs4_layoutcommit_args *);
|
const struct nfs4_layoutcommit_args *);
|
||||||
|
|
||||||
extern void objlayout_encode_layoutreturn(
|
extern void objlayout_encode_layoutreturn(
|
||||||
struct pnfs_layout_hdr *,
|
|
||||||
struct xdr_stream *,
|
struct xdr_stream *,
|
||||||
const struct nfs4_layoutreturn_args *);
|
const struct nfs4_layoutreturn_args *);
|
||||||
|
|
||||||
|
|
|
@ -172,8 +172,7 @@ struct pnfs_layoutdriver_type {
|
||||||
(struct nfs_server *server, struct pnfs_device *pdev,
|
(struct nfs_server *server, struct pnfs_device *pdev,
|
||||||
gfp_t gfp_flags);
|
gfp_t gfp_flags);
|
||||||
|
|
||||||
void (*encode_layoutreturn) (struct pnfs_layout_hdr *layoutid,
|
void (*encode_layoutreturn) (struct xdr_stream *xdr,
|
||||||
struct xdr_stream *xdr,
|
|
||||||
const struct nfs4_layoutreturn_args *args);
|
const struct nfs4_layoutreturn_args *args);
|
||||||
|
|
||||||
void (*cleanup_layoutcommit) (struct nfs4_layoutcommit_data *data);
|
void (*cleanup_layoutcommit) (struct nfs4_layoutcommit_data *data);
|
||||||
|
|
Loading…
Reference in New Issue