Commit 64e20ba2 authored by Vasily Averin's avatar Vasily Averin Committed by J. Bruce Fields

sunrpc: remove unused xpo_prep_reply_hdr callback

xpo_prep_reply_hdr are not used now.

It was defined for tcp transport only, however it cannot be
called indirectly, so let's move it to its caller and
remove unused callback.
Signed-off-by: default avatarVasily Averin <vvs@virtuozzo.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent 7ef88ff8
...@@ -193,7 +193,6 @@ extern int svc_rdma_sendto(struct svc_rqst *); ...@@ -193,7 +193,6 @@ extern int svc_rdma_sendto(struct svc_rqst *);
extern int svc_rdma_create_listen(struct svc_serv *, int, struct sockaddr *); extern int svc_rdma_create_listen(struct svc_serv *, int, struct sockaddr *);
extern void svc_sq_reap(struct svcxprt_rdma *); extern void svc_sq_reap(struct svcxprt_rdma *);
extern void svc_rq_reap(struct svcxprt_rdma *); extern void svc_rq_reap(struct svcxprt_rdma *);
extern void svc_rdma_prep_reply_hdr(struct svc_rqst *);
extern struct svc_xprt_class svc_rdma_class; extern struct svc_xprt_class svc_rdma_class;
#ifdef CONFIG_SUNRPC_BACKCHANNEL #ifdef CONFIG_SUNRPC_BACKCHANNEL
......
...@@ -20,7 +20,6 @@ struct svc_xprt_ops { ...@@ -20,7 +20,6 @@ struct svc_xprt_ops {
struct svc_xprt *(*xpo_accept)(struct svc_xprt *); struct svc_xprt *(*xpo_accept)(struct svc_xprt *);
int (*xpo_has_wspace)(struct svc_xprt *); int (*xpo_has_wspace)(struct svc_xprt *);
int (*xpo_recvfrom)(struct svc_rqst *); int (*xpo_recvfrom)(struct svc_rqst *);
void (*xpo_prep_reply_hdr)(struct svc_rqst *);
int (*xpo_sendto)(struct svc_rqst *); int (*xpo_sendto)(struct svc_rqst *);
void (*xpo_release_rqst)(struct svc_rqst *); void (*xpo_release_rqst)(struct svc_rqst *);
void (*xpo_detach)(struct svc_xprt *); void (*xpo_detach)(struct svc_xprt *);
......
...@@ -1144,6 +1144,17 @@ void svc_printk(struct svc_rqst *rqstp, const char *fmt, ...) ...@@ -1144,6 +1144,17 @@ void svc_printk(struct svc_rqst *rqstp, const char *fmt, ...)
static __printf(2,3) void svc_printk(struct svc_rqst *rqstp, const char *fmt, ...) {} static __printf(2,3) void svc_printk(struct svc_rqst *rqstp, const char *fmt, ...) {}
#endif #endif
/*
* Setup response header for TCP, it has a 4B record length field.
*/
static void svc_tcp_prep_reply_hdr(struct svc_rqst *rqstp)
{
struct kvec *resv = &rqstp->rq_res.head[0];
/* tcp needs a space for the record length... */
svc_putnl(resv, 0);
}
/* /*
* Common routine for processing the RPC request. * Common routine for processing the RPC request.
*/ */
......
...@@ -610,10 +610,6 @@ svc_udp_sendto(struct svc_rqst *rqstp) ...@@ -610,10 +610,6 @@ svc_udp_sendto(struct svc_rqst *rqstp)
return error; return error;
} }
static void svc_udp_prep_reply_hdr(struct svc_rqst *rqstp)
{
}
static int svc_udp_has_wspace(struct svc_xprt *xprt) static int svc_udp_has_wspace(struct svc_xprt *xprt)
{ {
struct svc_sock *svsk = container_of(xprt, struct svc_sock, sk_xprt); struct svc_sock *svsk = container_of(xprt, struct svc_sock, sk_xprt);
...@@ -657,7 +653,6 @@ static const struct svc_xprt_ops svc_udp_ops = { ...@@ -657,7 +653,6 @@ static const struct svc_xprt_ops svc_udp_ops = {
.xpo_release_rqst = svc_release_udp_skb, .xpo_release_rqst = svc_release_udp_skb,
.xpo_detach = svc_sock_detach, .xpo_detach = svc_sock_detach,
.xpo_free = svc_sock_free, .xpo_free = svc_sock_free,
.xpo_prep_reply_hdr = svc_udp_prep_reply_hdr,
.xpo_has_wspace = svc_udp_has_wspace, .xpo_has_wspace = svc_udp_has_wspace,
.xpo_accept = svc_udp_accept, .xpo_accept = svc_udp_accept,
.xpo_secure_port = svc_sock_secure_port, .xpo_secure_port = svc_sock_secure_port,
...@@ -1163,17 +1158,6 @@ static int svc_tcp_sendto(struct svc_rqst *rqstp) ...@@ -1163,17 +1158,6 @@ static int svc_tcp_sendto(struct svc_rqst *rqstp)
return sent; return sent;
} }
/*
* Setup response header. TCP has a 4B record length field.
*/
void svc_tcp_prep_reply_hdr(struct svc_rqst *rqstp)
{
struct kvec *resv = &rqstp->rq_res.head[0];
/* tcp needs a space for the record length... */
svc_putnl(resv, 0);
}
static struct svc_xprt *svc_tcp_create(struct svc_serv *serv, static struct svc_xprt *svc_tcp_create(struct svc_serv *serv,
struct net *net, struct net *net,
struct sockaddr *sa, int salen, struct sockaddr *sa, int salen,
...@@ -1189,7 +1173,6 @@ static const struct svc_xprt_ops svc_tcp_ops = { ...@@ -1189,7 +1173,6 @@ static const struct svc_xprt_ops svc_tcp_ops = {
.xpo_release_rqst = svc_release_skb, .xpo_release_rqst = svc_release_skb,
.xpo_detach = svc_tcp_sock_detach, .xpo_detach = svc_tcp_sock_detach,
.xpo_free = svc_sock_free, .xpo_free = svc_sock_free,
.xpo_prep_reply_hdr = svc_tcp_prep_reply_hdr,
.xpo_has_wspace = svc_tcp_has_wspace, .xpo_has_wspace = svc_tcp_has_wspace,
.xpo_accept = svc_tcp_accept, .xpo_accept = svc_tcp_accept,
.xpo_secure_port = svc_sock_secure_port, .xpo_secure_port = svc_sock_secure_port,
......
...@@ -714,10 +714,6 @@ static int svc_rdma_send_error_msg(struct svcxprt_rdma *rdma, ...@@ -714,10 +714,6 @@ static int svc_rdma_send_error_msg(struct svcxprt_rdma *rdma,
return 0; return 0;
} }
void svc_rdma_prep_reply_hdr(struct svc_rqst *rqstp)
{
}
/** /**
* svc_rdma_sendto - Transmit an RPC reply * svc_rdma_sendto - Transmit an RPC reply
* @rqstp: processed RPC request, reply XDR already in ::rq_res * @rqstp: processed RPC request, reply XDR already in ::rq_res
......
...@@ -85,7 +85,6 @@ static const struct svc_xprt_ops svc_rdma_ops = { ...@@ -85,7 +85,6 @@ static const struct svc_xprt_ops svc_rdma_ops = {
.xpo_release_rqst = svc_rdma_release_rqst, .xpo_release_rqst = svc_rdma_release_rqst,
.xpo_detach = svc_rdma_detach, .xpo_detach = svc_rdma_detach,
.xpo_free = svc_rdma_free, .xpo_free = svc_rdma_free,
.xpo_prep_reply_hdr = svc_rdma_prep_reply_hdr,
.xpo_has_wspace = svc_rdma_has_wspace, .xpo_has_wspace = svc_rdma_has_wspace,
.xpo_accept = svc_rdma_accept, .xpo_accept = svc_rdma_accept,
.xpo_secure_port = svc_rdma_secure_port, .xpo_secure_port = svc_rdma_secure_port,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment