Commit 49a9072f authored by Chuck Lever's avatar Chuck Lever Committed by Trond Myklebust

SUNRPC: Remove @family argument from svc_create() and svc_create_pooled()

Since an RPC service listener's protocol family is specified now via
svc_create_xprt(), it no longer needs to be passed to svc_create() or
svc_create_pooled().  Remove that argument from the synopsis of those
functions, and remove the sv_family field from the svc_serv struct.
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 9652ada3
...@@ -275,7 +275,7 @@ int lockd_up(void) ...@@ -275,7 +275,7 @@ int lockd_up(void)
"lockd_up: no pid, %d users??\n", nlmsvc_users); "lockd_up: no pid, %d users??\n", nlmsvc_users);
error = -ENOMEM; error = -ENOMEM;
serv = svc_create(&nlmsvc_program, LOCKD_BUFSIZE, nlmsvc_family, NULL); serv = svc_create(&nlmsvc_program, LOCKD_BUFSIZE, NULL);
if (!serv) { if (!serv) {
printk(KERN_WARNING "lockd_up: create service failed\n"); printk(KERN_WARNING "lockd_up: create service failed\n");
goto out; goto out;
......
...@@ -116,8 +116,7 @@ int nfs_callback_up(void) ...@@ -116,8 +116,7 @@ int nfs_callback_up(void)
mutex_lock(&nfs_callback_mutex); mutex_lock(&nfs_callback_mutex);
if (nfs_callback_info.users++ || nfs_callback_info.task != NULL) if (nfs_callback_info.users++ || nfs_callback_info.task != NULL)
goto out; goto out;
serv = svc_create(&nfs4_callback_program, NFS4_CALLBACK_BUFSIZE, serv = svc_create(&nfs4_callback_program, NFS4_CALLBACK_BUFSIZE, NULL);
nfs_callback_family, NULL);
ret = -ENOMEM; ret = -ENOMEM;
if (!serv) if (!serv)
goto out_err; goto out_err;
......
...@@ -229,7 +229,6 @@ int nfsd_create_serv(void) ...@@ -229,7 +229,6 @@ int nfsd_create_serv(void)
atomic_set(&nfsd_busy, 0); atomic_set(&nfsd_busy, 0);
nfsd_serv = svc_create_pooled(&nfsd_program, nfsd_max_blksize, nfsd_serv = svc_create_pooled(&nfsd_program, nfsd_max_blksize,
AF_INET,
nfsd_last_thread, nfsd, THIS_MODULE); nfsd_last_thread, nfsd, THIS_MODULE);
if (nfsd_serv == NULL) if (nfsd_serv == NULL)
err = -ENOMEM; err = -ENOMEM;
......
...@@ -69,7 +69,6 @@ struct svc_serv { ...@@ -69,7 +69,6 @@ struct svc_serv {
struct list_head sv_tempsocks; /* all temporary sockets */ struct list_head sv_tempsocks; /* all temporary sockets */
int sv_tmpcnt; /* count of temporary sockets */ int sv_tmpcnt; /* count of temporary sockets */
struct timer_list sv_temptimer; /* timer for aging temporary sockets */ struct timer_list sv_temptimer; /* timer for aging temporary sockets */
sa_family_t sv_family; /* listener's address family */
char * sv_name; /* service name */ char * sv_name; /* service name */
...@@ -385,13 +384,13 @@ struct svc_procedure { ...@@ -385,13 +384,13 @@ struct svc_procedure {
/* /*
* Function prototypes. * Function prototypes.
*/ */
struct svc_serv *svc_create(struct svc_program *, unsigned int, sa_family_t, struct svc_serv *svc_create(struct svc_program *, unsigned int,
void (*shutdown)(struct svc_serv *)); void (*shutdown)(struct svc_serv *));
struct svc_rqst *svc_prepare_thread(struct svc_serv *serv, struct svc_rqst *svc_prepare_thread(struct svc_serv *serv,
struct svc_pool *pool); struct svc_pool *pool);
void svc_exit_thread(struct svc_rqst *); void svc_exit_thread(struct svc_rqst *);
struct svc_serv * svc_create_pooled(struct svc_program *, unsigned int, struct svc_serv * svc_create_pooled(struct svc_program *, unsigned int,
sa_family_t, void (*shutdown)(struct svc_serv *), void (*shutdown)(struct svc_serv *),
svc_thread_fn, struct module *); svc_thread_fn, struct module *);
int svc_set_num_threads(struct svc_serv *, struct svc_pool *, int); int svc_set_num_threads(struct svc_serv *, struct svc_pool *, int);
void svc_destroy(struct svc_serv *); void svc_destroy(struct svc_serv *);
......
...@@ -359,7 +359,7 @@ svc_pool_for_cpu(struct svc_serv *serv, int cpu) ...@@ -359,7 +359,7 @@ svc_pool_for_cpu(struct svc_serv *serv, int cpu)
*/ */
static struct svc_serv * static struct svc_serv *
__svc_create(struct svc_program *prog, unsigned int bufsize, int npools, __svc_create(struct svc_program *prog, unsigned int bufsize, int npools,
sa_family_t family, void (*shutdown)(struct svc_serv *serv)) void (*shutdown)(struct svc_serv *serv))
{ {
struct svc_serv *serv; struct svc_serv *serv;
unsigned int vers; unsigned int vers;
...@@ -368,7 +368,6 @@ __svc_create(struct svc_program *prog, unsigned int bufsize, int npools, ...@@ -368,7 +368,6 @@ __svc_create(struct svc_program *prog, unsigned int bufsize, int npools,
if (!(serv = kzalloc(sizeof(*serv), GFP_KERNEL))) if (!(serv = kzalloc(sizeof(*serv), GFP_KERNEL)))
return NULL; return NULL;
serv->sv_family = family;
serv->sv_name = prog->pg_name; serv->sv_name = prog->pg_name;
serv->sv_program = prog; serv->sv_program = prog;
serv->sv_nrthreads = 1; serv->sv_nrthreads = 1;
...@@ -427,21 +426,21 @@ __svc_create(struct svc_program *prog, unsigned int bufsize, int npools, ...@@ -427,21 +426,21 @@ __svc_create(struct svc_program *prog, unsigned int bufsize, int npools,
struct svc_serv * struct svc_serv *
svc_create(struct svc_program *prog, unsigned int bufsize, svc_create(struct svc_program *prog, unsigned int bufsize,
sa_family_t family, void (*shutdown)(struct svc_serv *serv)) void (*shutdown)(struct svc_serv *serv))
{ {
return __svc_create(prog, bufsize, /*npools*/1, family, shutdown); return __svc_create(prog, bufsize, /*npools*/1, shutdown);
} }
EXPORT_SYMBOL_GPL(svc_create); EXPORT_SYMBOL_GPL(svc_create);
struct svc_serv * struct svc_serv *
svc_create_pooled(struct svc_program *prog, unsigned int bufsize, svc_create_pooled(struct svc_program *prog, unsigned int bufsize,
sa_family_t family, void (*shutdown)(struct svc_serv *serv), void (*shutdown)(struct svc_serv *serv),
svc_thread_fn func, struct module *mod) svc_thread_fn func, struct module *mod)
{ {
struct svc_serv *serv; struct svc_serv *serv;
unsigned int npools = svc_pool_map_get(); unsigned int npools = svc_pool_map_get();
serv = __svc_create(prog, bufsize, npools, family, shutdown); serv = __svc_create(prog, bufsize, npools, shutdown);
if (serv != NULL) { if (serv != NULL) {
serv->sv_function = func; serv->sv_function = func;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment