aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/svc_xprt.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2012-08-17 22:12:19 -0400
committerJ. Bruce Fields <bfields@redhat.com>2012-08-21 17:42:01 -0400
commit6741019c829ecfa6f7a504fae1305dcf5d5cf057 (patch)
treea0b749e9ccab9d0bb813ff8b92fde629d40e4bc4 /net/sunrpc/svc_xprt.c
parent5b444cc9a4c979aa0fa185c8ddca221462a34b7a (diff)
svcrpc: make svc_xprt_received static
Note this isn't used outside svc_xprt.c. May as well move it so we don't need a declaration while we're here. Also remove an outdated comment. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'net/sunrpc/svc_xprt.c')
-rw-r--r--net/sunrpc/svc_xprt.c41
1 files changed, 20 insertions, 21 deletions
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c
index 3e317307e288..295e6ed21ca0 100644
--- a/net/sunrpc/svc_xprt.c
+++ b/net/sunrpc/svc_xprt.c
@@ -208,6 +208,26 @@ static struct svc_xprt *__svc_xpo_create(struct svc_xprt_class *xcl,
208 return xcl->xcl_ops->xpo_create(serv, net, sap, len, flags); 208 return xcl->xcl_ops->xpo_create(serv, net, sap, len, flags);
209} 209}
210 210
211/*
212 * svc_xprt_received conditionally queues the transport for processing
213 * by another thread. The caller must hold the XPT_BUSY bit and must
214 * not thereafter touch transport data.
215 *
216 * Note: XPT_DATA only gets cleared when a read-attempt finds no (or
217 * insufficient) data.
218 */
219static void svc_xprt_received(struct svc_xprt *xprt)
220{
221 BUG_ON(!test_bit(XPT_BUSY, &xprt->xpt_flags));
222 /* As soon as we clear busy, the xprt could be closed and
223 * 'put', so we need a reference to call svc_xprt_enqueue with:
224 */
225 svc_xprt_get(xprt);
226 clear_bit(XPT_BUSY, &xprt->xpt_flags);
227 svc_xprt_enqueue(xprt);
228 svc_xprt_put(xprt);
229}
230
211void svc_add_new_perm_xprt(struct svc_serv *serv, struct svc_xprt *new) 231void svc_add_new_perm_xprt(struct svc_serv *serv, struct svc_xprt *new)
212{ 232{
213 clear_bit(XPT_TEMP, &new->xpt_flags); 233 clear_bit(XPT_TEMP, &new->xpt_flags);
@@ -398,27 +418,6 @@ static struct svc_xprt *svc_xprt_dequeue(struct svc_pool *pool)
398 return xprt; 418 return xprt;
399} 419}
400 420
401/*
402 * svc_xprt_received conditionally queues the transport for processing
403 * by another thread. The caller must hold the XPT_BUSY bit and must
404 * not thereafter touch transport data.
405 *
406 * Note: XPT_DATA only gets cleared when a read-attempt finds no (or
407 * insufficient) data.
408 */
409void svc_xprt_received(struct svc_xprt *xprt)
410{
411 BUG_ON(!test_bit(XPT_BUSY, &xprt->xpt_flags));
412 /* As soon as we clear busy, the xprt could be closed and
413 * 'put', so we need a reference to call svc_xprt_enqueue with:
414 */
415 svc_xprt_get(xprt);
416 clear_bit(XPT_BUSY, &xprt->xpt_flags);
417 svc_xprt_enqueue(xprt);
418 svc_xprt_put(xprt);
419}
420EXPORT_SYMBOL_GPL(svc_xprt_received);
421
422/** 421/**
423 * svc_reserve - change the space reserved for the reply to a request. 422 * svc_reserve - change the space reserved for the reply to a request.
424 * @rqstp: The request in question 423 * @rqstp: The request in question