From patchwork Sun Sep 27 16:50:25 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [RFC,4/9] sunrpc: move rpc_xdr_buf_init to clnt.h From: Jeff Layton X-Patchwork-Id: 34348 Message-Id: <1254070230-13125-5-git-send-email-jlayton@redhat.com> To: linux-nfs@vger.kernel.org, linux-cifs-client@lists.samba.org Date: Sun, 27 Sep 2009 12:50:25 -0400 ...so that it can be used elsewhere. Signed-off-by: Jeff Layton --- include/linux/sunrpc/clnt.h | 13 ++++++++++++- net/sunrpc/clnt.c | 12 ------------ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index 00afedc..307a3ec 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h @@ -165,7 +165,6 @@ size_t rpc_max_payload(struct rpc_clnt *); void rpc_force_rebind(struct rpc_clnt *); size_t rpc_peeraddr(struct rpc_clnt *, struct sockaddr *, size_t); const char *rpc_peeraddr2str(struct rpc_clnt *, enum rpc_display_format_t); - size_t rpc_ntop(const struct sockaddr *, char *, const size_t); size_t rpc_pton(const char *, const size_t, struct sockaddr *, const size_t); @@ -197,6 +196,18 @@ static inline void rpc_set_port(struct sockaddr *sap, } } +static inline void +rpc_xdr_buf_init(struct xdr_buf *buf, void *start, size_t len) +{ + buf->head[0].iov_base = start; + buf->head[0].iov_len = len; + buf->tail[0].iov_len = 0; + buf->page_len = 0; + buf->flags = 0; + buf->len = 0; + buf->buflen = len; +} + #define IPV6_SCOPE_DELIMITER '%' #define IPV6_SCOPE_ID_LEN sizeof("%nnnnnnnnnn") diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index f05d289..42688af 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -966,18 +966,6 @@ rpc_task_force_reencode(struct rpc_task *task) task->tk_rqstp->rq_bytes_sent = 0; } -static inline void -rpc_xdr_buf_init(struct xdr_buf *buf, void *start, size_t len) -{ - buf->head[0].iov_base = start; - buf->head[0].iov_len = len; - buf->tail[0].iov_len = 0; - buf->page_len = 0; - buf->flags = 0; - buf->len = 0; - buf->buflen = len; -} - /* * 3. Encode arguments of an RPC call */