diff options
author | Jeff Layton <jlayton@primarydata.com> | 2015-06-08 12:05:56 -0700 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2015-08-10 16:05:41 -0400 |
commit | 758f62fff9ad630f05866a1dd6ae9453a7730c2e (patch) | |
tree | 07bf53619da925bc2b74e6365b9fff5ce0cd906d /include | |
parent | c369014f1776367269c8fbb5ea8932826d89ce2f (diff) | |
download | linux-758f62fff9ad630f05866a1dd6ae9453a7730c2e.tar.gz linux-758f62fff9ad630f05866a1dd6ae9453a7730c2e.tar.bz2 linux-758f62fff9ad630f05866a1dd6ae9453a7730c2e.zip |
nfsd/sunrpc: move sv_module parm into sv_ops
...not technically an operation, but it's more convenient and cleaner
to pass the module pointer in this struct.
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 'include')
-rw-r--r-- | include/linux/sunrpc/svc.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 7c51b21ce9d6..0150003d584b 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h @@ -54,7 +54,12 @@ struct svc_serv; struct svc_serv_ops { /* Callback to use when last thread exits. */ void (*svo_shutdown)(struct svc_serv *, struct net *); + + /* function for service threads to run */ int (*svo_function)(void *); + + /* optional module to count when adding threads (pooled svcs only) */ + struct module *svo_module; }; /* @@ -89,8 +94,6 @@ struct svc_serv { unsigned int sv_nrpools; /* number of thread pools */ struct svc_pool * sv_pools; /* array of thread pools */ struct svc_serv_ops *sv_ops; /* server operations */ - struct module * sv_module; /* optional module to count when - * adding threads */ #if defined(CONFIG_SUNRPC_BACKCHANNEL) struct list_head sv_cb_list; /* queue for callback requests * that arrive over the same @@ -430,7 +433,7 @@ struct svc_rqst *svc_prepare_thread(struct svc_serv *serv, struct svc_pool *pool, int node); void svc_exit_thread(struct svc_rqst *); struct svc_serv * svc_create_pooled(struct svc_program *, unsigned int, - struct svc_serv_ops *, struct module *); + struct svc_serv_ops *); int svc_set_num_threads(struct svc_serv *, struct svc_pool *, int); int svc_pool_stats_open(struct svc_serv *serv, struct file *file); void svc_destroy(struct svc_serv *); |