diff options
author | Jeff Layton <jlayton@primarydata.com> | 2015-06-08 15:06:51 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2015-08-10 16:05:42 -0400 |
commit | b9e13cdfac70e38ade17b53810a36968c5842339 (patch) | |
tree | ec666a325348130a4d1118d2d58373af21881532 /net | |
parent | 758f62fff9ad630f05866a1dd6ae9453a7730c2e (diff) |
nfsd/sunrpc: turn enqueueing a svc_xprt into a svc_serv operation
For now, all services use svc_xprt_do_enqueue, but once we add
workqueue-based service support, we'll need to do something different.
Signed-off-by: Shirley Ma <shirley.ma@oracle.com>
Acked-by: Jeff Layton <jlayton@primarydata.com>
Tested-by: Shirley Ma <shirley.ma@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/svc_xprt.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c index 163ac45c3639..a6cbb2104667 100644 --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c | |||
@@ -24,7 +24,6 @@ static int svc_deferred_recv(struct svc_rqst *rqstp); | |||
24 | static struct cache_deferred_req *svc_defer(struct cache_req *req); | 24 | static struct cache_deferred_req *svc_defer(struct cache_req *req); |
25 | static void svc_age_temp_xprts(unsigned long closure); | 25 | static void svc_age_temp_xprts(unsigned long closure); |
26 | static void svc_delete_xprt(struct svc_xprt *xprt); | 26 | static void svc_delete_xprt(struct svc_xprt *xprt); |
27 | static void svc_xprt_do_enqueue(struct svc_xprt *xprt); | ||
28 | 27 | ||
29 | /* apparently the "standard" is that clients close | 28 | /* apparently the "standard" is that clients close |
30 | * idle connections after 5 minutes, servers after | 29 | * idle connections after 5 minutes, servers after |
@@ -225,12 +224,12 @@ static void svc_xprt_received(struct svc_xprt *xprt) | |||
225 | } | 224 | } |
226 | 225 | ||
227 | /* As soon as we clear busy, the xprt could be closed and | 226 | /* As soon as we clear busy, the xprt could be closed and |
228 | * 'put', so we need a reference to call svc_xprt_do_enqueue with: | 227 | * 'put', so we need a reference to call svc_enqueue_xprt with: |
229 | */ | 228 | */ |
230 | svc_xprt_get(xprt); | 229 | svc_xprt_get(xprt); |
231 | smp_mb__before_atomic(); | 230 | smp_mb__before_atomic(); |
232 | clear_bit(XPT_BUSY, &xprt->xpt_flags); | 231 | clear_bit(XPT_BUSY, &xprt->xpt_flags); |
233 | svc_xprt_do_enqueue(xprt); | 232 | xprt->xpt_server->sv_ops->svo_enqueue_xprt(xprt); |
234 | svc_xprt_put(xprt); | 233 | svc_xprt_put(xprt); |
235 | } | 234 | } |
236 | 235 | ||
@@ -320,7 +319,7 @@ static bool svc_xprt_has_something_to_do(struct svc_xprt *xprt) | |||
320 | return false; | 319 | return false; |
321 | } | 320 | } |
322 | 321 | ||
323 | static void svc_xprt_do_enqueue(struct svc_xprt *xprt) | 322 | void svc_xprt_do_enqueue(struct svc_xprt *xprt) |
324 | { | 323 | { |
325 | struct svc_pool *pool; | 324 | struct svc_pool *pool; |
326 | struct svc_rqst *rqstp = NULL; | 325 | struct svc_rqst *rqstp = NULL; |
@@ -402,6 +401,7 @@ redo_search: | |||
402 | out: | 401 | out: |
403 | trace_svc_xprt_do_enqueue(xprt, rqstp); | 402 | trace_svc_xprt_do_enqueue(xprt, rqstp); |
404 | } | 403 | } |
404 | EXPORT_SYMBOL_GPL(svc_xprt_do_enqueue); | ||
405 | 405 | ||
406 | /* | 406 | /* |
407 | * Queue up a transport with data pending. If there are idle nfsd | 407 | * Queue up a transport with data pending. If there are idle nfsd |
@@ -412,7 +412,7 @@ void svc_xprt_enqueue(struct svc_xprt *xprt) | |||
412 | { | 412 | { |
413 | if (test_bit(XPT_BUSY, &xprt->xpt_flags)) | 413 | if (test_bit(XPT_BUSY, &xprt->xpt_flags)) |
414 | return; | 414 | return; |
415 | svc_xprt_do_enqueue(xprt); | 415 | xprt->xpt_server->sv_ops->svo_enqueue_xprt(xprt); |
416 | } | 416 | } |
417 | EXPORT_SYMBOL_GPL(svc_xprt_enqueue); | 417 | EXPORT_SYMBOL_GPL(svc_xprt_enqueue); |
418 | 418 | ||