Commit cca557a5 authored by Chuck Lever's avatar Chuck Lever

SUNRPC: Clean up svc_release_skb() functions

Rename these functions using the convention used for other xpo
method entry points.
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent 6be8c594
...@@ -109,10 +109,12 @@ static void svc_reclassify_socket(struct socket *sock) ...@@ -109,10 +109,12 @@ static void svc_reclassify_socket(struct socket *sock)
} }
#endif #endif
/* /**
* Release an skbuff after use * svc_tcp_release_rqst - Release transport-related resources
* @rqstp: request structure with resources to be released
*
*/ */
static void svc_release_skb(struct svc_rqst *rqstp) static void svc_tcp_release_rqst(struct svc_rqst *rqstp)
{ {
struct sk_buff *skb = rqstp->rq_xprt_ctxt; struct sk_buff *skb = rqstp->rq_xprt_ctxt;
...@@ -125,7 +127,12 @@ static void svc_release_skb(struct svc_rqst *rqstp) ...@@ -125,7 +127,12 @@ static void svc_release_skb(struct svc_rqst *rqstp)
} }
} }
static void svc_release_udp_skb(struct svc_rqst *rqstp) /**
* svc_udp_release_rqst - Release transport-related resources
* @rqstp: request structure with resources to be released
*
*/
static void svc_udp_release_rqst(struct svc_rqst *rqstp)
{ {
struct sk_buff *skb = rqstp->rq_xprt_ctxt; struct sk_buff *skb = rqstp->rq_xprt_ctxt;
...@@ -521,7 +528,7 @@ static int svc_udp_sendto(struct svc_rqst *rqstp) ...@@ -521,7 +528,7 @@ static int svc_udp_sendto(struct svc_rqst *rqstp)
unsigned int uninitialized_var(sent); unsigned int uninitialized_var(sent);
int err; int err;
svc_release_udp_skb(rqstp); svc_udp_release_rqst(rqstp);
svc_set_cmsg_data(rqstp, cmh); svc_set_cmsg_data(rqstp, cmh);
...@@ -590,7 +597,7 @@ static const struct svc_xprt_ops svc_udp_ops = { ...@@ -590,7 +597,7 @@ static const struct svc_xprt_ops svc_udp_ops = {
.xpo_recvfrom = svc_udp_recvfrom, .xpo_recvfrom = svc_udp_recvfrom,
.xpo_sendto = svc_udp_sendto, .xpo_sendto = svc_udp_sendto,
.xpo_read_payload = svc_sock_read_payload, .xpo_read_payload = svc_sock_read_payload,
.xpo_release_rqst = svc_release_udp_skb, .xpo_release_rqst = svc_udp_release_rqst,
.xpo_detach = svc_sock_detach, .xpo_detach = svc_sock_detach,
.xpo_free = svc_sock_free, .xpo_free = svc_sock_free,
.xpo_has_wspace = svc_udp_has_wspace, .xpo_has_wspace = svc_udp_has_wspace,
...@@ -1053,7 +1060,7 @@ static int svc_tcp_sendto(struct svc_rqst *rqstp) ...@@ -1053,7 +1060,7 @@ static int svc_tcp_sendto(struct svc_rqst *rqstp)
unsigned int uninitialized_var(sent); unsigned int uninitialized_var(sent);
int err; int err;
svc_release_skb(rqstp); svc_tcp_release_rqst(rqstp);
mutex_lock(&xprt->xpt_mutex); mutex_lock(&xprt->xpt_mutex);
if (svc_xprt_is_dead(xprt)) if (svc_xprt_is_dead(xprt))
...@@ -1093,7 +1100,7 @@ static const struct svc_xprt_ops svc_tcp_ops = { ...@@ -1093,7 +1100,7 @@ static const struct svc_xprt_ops svc_tcp_ops = {
.xpo_recvfrom = svc_tcp_recvfrom, .xpo_recvfrom = svc_tcp_recvfrom,
.xpo_sendto = svc_tcp_sendto, .xpo_sendto = svc_tcp_sendto,
.xpo_read_payload = svc_sock_read_payload, .xpo_read_payload = svc_sock_read_payload,
.xpo_release_rqst = svc_release_skb, .xpo_release_rqst = svc_tcp_release_rqst,
.xpo_detach = svc_tcp_sock_detach, .xpo_detach = svc_tcp_sock_detach,
.xpo_free = svc_sock_free, .xpo_free = svc_sock_free,
.xpo_has_wspace = svc_tcp_has_wspace, .xpo_has_wspace = svc_tcp_has_wspace,
......
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