diff options
author | Jeff Layton <jlayton@primarydata.com> | 2015-06-08 15:04:46 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2015-08-10 16:05:41 -0400 |
commit | c369014f1776367269c8fbb5ea8932826d89ce2f (patch) | |
tree | 4abaee756d4e130e5b8c6cd637b981a73af3533b /net/sunrpc | |
parent | ea126e74353453d15fc0a181910ae1e25162f2a1 (diff) |
nfsd/sunrpc: move sv_function into sv_ops
Since we now have a container for holding svc_serv operations, move the
sv_function into it as well.
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/sunrpc')
-rw-r--r-- | net/sunrpc/svc.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index 36eee907696b..5b8726030c24 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c | |||
@@ -34,7 +34,7 @@ | |||
34 | 34 | ||
35 | static void svc_unregister(const struct svc_serv *serv, struct net *net); | 35 | static void svc_unregister(const struct svc_serv *serv, struct net *net); |
36 | 36 | ||
37 | #define svc_serv_is_pooled(serv) ((serv)->sv_function) | 37 | #define svc_serv_is_pooled(serv) ((serv)->sv_ops->svo_function) |
38 | 38 | ||
39 | /* | 39 | /* |
40 | * Mode for mapping cpus to pools. | 40 | * Mode for mapping cpus to pools. |
@@ -494,8 +494,7 @@ EXPORT_SYMBOL_GPL(svc_create); | |||
494 | 494 | ||
495 | struct svc_serv * | 495 | struct svc_serv * |
496 | svc_create_pooled(struct svc_program *prog, unsigned int bufsize, | 496 | svc_create_pooled(struct svc_program *prog, unsigned int bufsize, |
497 | struct svc_serv_ops *ops, svc_thread_fn func, | 497 | struct svc_serv_ops *ops, struct module *mod) |
498 | struct module *mod) | ||
499 | { | 498 | { |
500 | struct svc_serv *serv; | 499 | struct svc_serv *serv; |
501 | unsigned int npools = svc_pool_map_get(); | 500 | unsigned int npools = svc_pool_map_get(); |
@@ -504,7 +503,6 @@ svc_create_pooled(struct svc_program *prog, unsigned int bufsize, | |||
504 | if (!serv) | 503 | if (!serv) |
505 | goto out_err; | 504 | goto out_err; |
506 | 505 | ||
507 | serv->sv_function = func; | ||
508 | serv->sv_module = mod; | 506 | serv->sv_module = mod; |
509 | return serv; | 507 | return serv; |
510 | out_err: | 508 | out_err: |
@@ -740,7 +738,7 @@ svc_set_num_threads(struct svc_serv *serv, struct svc_pool *pool, int nrservs) | |||
740 | } | 738 | } |
741 | 739 | ||
742 | __module_get(serv->sv_module); | 740 | __module_get(serv->sv_module); |
743 | task = kthread_create_on_node(serv->sv_function, rqstp, | 741 | task = kthread_create_on_node(serv->sv_ops->svo_function, rqstp, |
744 | node, "%s", serv->sv_name); | 742 | node, "%s", serv->sv_name); |
745 | if (IS_ERR(task)) { | 743 | if (IS_ERR(task)) { |
746 | error = PTR_ERR(task); | 744 | error = PTR_ERR(task); |