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>
This commit is contained in:

committed by
J. Bruce Fields

parent
ea126e7435
commit
c369014f17
@@ -34,7 +34,7 @@
|
||||
|
||||
static void svc_unregister(const struct svc_serv *serv, struct net *net);
|
||||
|
||||
#define svc_serv_is_pooled(serv) ((serv)->sv_function)
|
||||
#define svc_serv_is_pooled(serv) ((serv)->sv_ops->svo_function)
|
||||
|
||||
/*
|
||||
* Mode for mapping cpus to pools.
|
||||
@@ -494,8 +494,7 @@ EXPORT_SYMBOL_GPL(svc_create);
|
||||
|
||||
struct svc_serv *
|
||||
svc_create_pooled(struct svc_program *prog, unsigned int bufsize,
|
||||
struct svc_serv_ops *ops, svc_thread_fn func,
|
||||
struct module *mod)
|
||||
struct svc_serv_ops *ops, struct module *mod)
|
||||
{
|
||||
struct svc_serv *serv;
|
||||
unsigned int npools = svc_pool_map_get();
|
||||
@@ -504,7 +503,6 @@ svc_create_pooled(struct svc_program *prog, unsigned int bufsize,
|
||||
if (!serv)
|
||||
goto out_err;
|
||||
|
||||
serv->sv_function = func;
|
||||
serv->sv_module = mod;
|
||||
return serv;
|
||||
out_err:
|
||||
@@ -740,7 +738,7 @@ svc_set_num_threads(struct svc_serv *serv, struct svc_pool *pool, int nrservs)
|
||||
}
|
||||
|
||||
__module_get(serv->sv_module);
|
||||
task = kthread_create_on_node(serv->sv_function, rqstp,
|
||||
task = kthread_create_on_node(serv->sv_ops->svo_function, rqstp,
|
||||
node, "%s", serv->sv_name);
|
||||
if (IS_ERR(task)) {
|
||||
error = PTR_ERR(task);
|
||||
|
Reference in New Issue
Block a user