Skip to content

Commit fd42ba8

Browse files
amschuma-ntapTrond Myklebust
authored andcommitted
NFSv4.2: Clean up: Move the encode_copy_commit() function
Move the function to be with the other encode_*() functions, instead of in the middle of the nfs4_xdr_enc_*() section. Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
1 parent 45a3e24 commit fd42ba8

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

fs/nfs/nfs42xdr.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,18 @@ static void encode_copy(struct xdr_stream *xdr,
317317
encode_nl4_server(xdr, args->cp_src);
318318
}
319319

320+
static void encode_copy_commit(struct xdr_stream *xdr,
321+
const struct nfs42_copy_args *args,
322+
struct compound_hdr *hdr)
323+
{
324+
__be32 *p;
325+
326+
encode_op_hdr(xdr, OP_COMMIT, decode_commit_maxsz, hdr);
327+
p = reserve_space(xdr, 12);
328+
p = xdr_encode_hyper(p, args->dst_pos);
329+
*p = cpu_to_be32(args->count);
330+
}
331+
320332
static void encode_offload_cancel(struct xdr_stream *xdr,
321333
const struct nfs42_offload_status_args *args,
322334
struct compound_hdr *hdr)
@@ -671,18 +683,6 @@ static void nfs4_xdr_enc_allocate(struct rpc_rqst *req,
671683
encode_nops(&hdr);
672684
}
673685

674-
static void encode_copy_commit(struct xdr_stream *xdr,
675-
const struct nfs42_copy_args *args,
676-
struct compound_hdr *hdr)
677-
{
678-
__be32 *p;
679-
680-
encode_op_hdr(xdr, OP_COMMIT, decode_commit_maxsz, hdr);
681-
p = reserve_space(xdr, 12);
682-
p = xdr_encode_hyper(p, args->dst_pos);
683-
*p = cpu_to_be32(args->count);
684-
}
685-
686686
/*
687687
* Encode COPY request
688688
*/

0 commit comments

Comments
 (0)