aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2009-03-18 20:46:29 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2009-03-28 15:54:48 -0400
commit49a9072f29a1039f142ec98b44a72d7173651c02 (patch)
treed2a87541cb699fb6b1fbdef492f3dc6c305aa541
parent9652ada3fb5914a67d8422114e8a76388330fa79 (diff)
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: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
-rw-r--r--fs/lockd/svc.c2
-rw-r--r--fs/nfs/callback.c3
-rw-r--r--fs/nfsd/nfssvc.c1
-rw-r--r--include/linux/sunrpc/svc.h5
-rw-r--r--net/sunrpc/svc.c11
5 files changed, 9 insertions, 13 deletions
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
index 390c5593655c..d30920038cb6 100644
--- a/fs/lockd/svc.c
+++ b/fs/lockd/svc.c
@@ -275,7 +275,7 @@ int lockd_up(void)
275 "lockd_up: no pid, %d users??\n", nlmsvc_users); 275 "lockd_up: no pid, %d users??\n", nlmsvc_users);
276 276
277 error = -ENOMEM; 277 error = -ENOMEM;
278 serv = svc_create(&nlmsvc_program, LOCKD_BUFSIZE, nlmsvc_family, NULL); 278 serv = svc_create(&nlmsvc_program, LOCKD_BUFSIZE, NULL);
279 if (!serv) { 279 if (!serv) {
280 printk(KERN_WARNING "lockd_up: create service failed\n"); 280 printk(KERN_WARNING "lockd_up: create service failed\n");
281 goto out; 281 goto out;
diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c
index fb35cab63c8a..ddf4b4ae6967 100644
--- a/fs/nfs/callback.c
+++ b/fs/nfs/callback.c
@@ -116,8 +116,7 @@ int nfs_callback_up(void)
116 mutex_lock(&nfs_callback_mutex); 116 mutex_lock(&nfs_callback_mutex);
117 if (nfs_callback_info.users++ || nfs_callback_info.task != NULL) 117 if (nfs_callback_info.users++ || nfs_callback_info.task != NULL)
118 goto out; 118 goto out;
119 serv = svc_create(&nfs4_callback_program, NFS4_CALLBACK_BUFSIZE, 119 serv = svc_create(&nfs4_callback_program, NFS4_CALLBACK_BUFSIZE, NULL);
120 nfs_callback_family, NULL);
121 ret = -ENOMEM; 120 ret = -ENOMEM;
122 if (!serv) 121 if (!serv)
123 goto out_err; 122 goto out_err;
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
index ab7f249055b5..bc3567bab8c4 100644
--- a/fs/nfsd/nfssvc.c
+++ b/fs/nfsd/nfssvc.c
@@ -229,7 +229,6 @@ int nfsd_create_serv(void)
229 229
230 atomic_set(&nfsd_busy, 0); 230 atomic_set(&nfsd_busy, 0);
231 nfsd_serv = svc_create_pooled(&nfsd_program, nfsd_max_blksize, 231 nfsd_serv = svc_create_pooled(&nfsd_program, nfsd_max_blksize,
232 AF_INET,
233 nfsd_last_thread, nfsd, THIS_MODULE); 232 nfsd_last_thread, nfsd, THIS_MODULE);
234 if (nfsd_serv == NULL) 233 if (nfsd_serv == NULL)
235 err = -ENOMEM; 234 err = -ENOMEM;
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index 1f18fc728cba..d3a4c0231933 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -69,7 +69,6 @@ struct svc_serv {
69 struct list_head sv_tempsocks; /* all temporary sockets */ 69 struct list_head sv_tempsocks; /* all temporary sockets */
70 int sv_tmpcnt; /* count of temporary sockets */ 70 int sv_tmpcnt; /* count of temporary sockets */
71 struct timer_list sv_temptimer; /* timer for aging temporary sockets */ 71 struct timer_list sv_temptimer; /* timer for aging temporary sockets */
72 sa_family_t sv_family; /* listener's address family */
73 72
74 char * sv_name; /* service name */ 73 char * sv_name; /* service name */
75 74
@@ -385,13 +384,13 @@ struct svc_procedure {
385/* 384/*
386 * Function prototypes. 385 * Function prototypes.
387 */ 386 */
388struct svc_serv *svc_create(struct svc_program *, unsigned int, sa_family_t, 387struct svc_serv *svc_create(struct svc_program *, unsigned int,
389 void (*shutdown)(struct svc_serv *)); 388 void (*shutdown)(struct svc_serv *));
390struct svc_rqst *svc_prepare_thread(struct svc_serv *serv, 389struct svc_rqst *svc_prepare_thread(struct svc_serv *serv,
391 struct svc_pool *pool); 390 struct svc_pool *pool);
392void svc_exit_thread(struct svc_rqst *); 391void svc_exit_thread(struct svc_rqst *);
393struct svc_serv * svc_create_pooled(struct svc_program *, unsigned int, 392struct svc_serv * svc_create_pooled(struct svc_program *, unsigned int,
394 sa_family_t, void (*shutdown)(struct svc_serv *), 393 void (*shutdown)(struct svc_serv *),
395 svc_thread_fn, struct module *); 394 svc_thread_fn, struct module *);
396int svc_set_num_threads(struct svc_serv *, struct svc_pool *, int); 395int svc_set_num_threads(struct svc_serv *, struct svc_pool *, int);
397void svc_destroy(struct svc_serv *); 396void svc_destroy(struct svc_serv *);
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index 41bc36ea2224..d72ff44826d8 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -359,7 +359,7 @@ svc_pool_for_cpu(struct svc_serv *serv, int cpu)
359 */ 359 */
360static struct svc_serv * 360static struct svc_serv *
361__svc_create(struct svc_program *prog, unsigned int bufsize, int npools, 361__svc_create(struct svc_program *prog, unsigned int bufsize, int npools,
362 sa_family_t family, void (*shutdown)(struct svc_serv *serv)) 362 void (*shutdown)(struct svc_serv *serv))
363{ 363{
364 struct svc_serv *serv; 364 struct svc_serv *serv;
365 unsigned int vers; 365 unsigned int vers;
@@ -368,7 +368,6 @@ __svc_create(struct svc_program *prog, unsigned int bufsize, int npools,
368 368
369 if (!(serv = kzalloc(sizeof(*serv), GFP_KERNEL))) 369 if (!(serv = kzalloc(sizeof(*serv), GFP_KERNEL)))
370 return NULL; 370 return NULL;
371 serv->sv_family = family;
372 serv->sv_name = prog->pg_name; 371 serv->sv_name = prog->pg_name;
373 serv->sv_program = prog; 372 serv->sv_program = prog;
374 serv->sv_nrthreads = 1; 373 serv->sv_nrthreads = 1;
@@ -427,21 +426,21 @@ __svc_create(struct svc_program *prog, unsigned int bufsize, int npools,
427 426
428struct svc_serv * 427struct svc_serv *
429svc_create(struct svc_program *prog, unsigned int bufsize, 428svc_create(struct svc_program *prog, unsigned int bufsize,
430 sa_family_t family, void (*shutdown)(struct svc_serv *serv)) 429 void (*shutdown)(struct svc_serv *serv))
431{ 430{
432 return __svc_create(prog, bufsize, /*npools*/1, family, shutdown); 431 return __svc_create(prog, bufsize, /*npools*/1, shutdown);
433} 432}
434EXPORT_SYMBOL_GPL(svc_create); 433EXPORT_SYMBOL_GPL(svc_create);
435 434
436struct svc_serv * 435struct svc_serv *
437svc_create_pooled(struct svc_program *prog, unsigned int bufsize, 436svc_create_pooled(struct svc_program *prog, unsigned int bufsize,
438 sa_family_t family, void (*shutdown)(struct svc_serv *serv), 437 void (*shutdown)(struct svc_serv *serv),
439 svc_thread_fn func, struct module *mod) 438 svc_thread_fn func, struct module *mod)
440{ 439{
441 struct svc_serv *serv; 440 struct svc_serv *serv;
442 unsigned int npools = svc_pool_map_get(); 441 unsigned int npools = svc_pool_map_get();
443 442
444 serv = __svc_create(prog, bufsize, npools, family, shutdown); 443 serv = __svc_create(prog, bufsize, npools, shutdown);
445 444
446 if (serv != NULL) { 445 if (serv != NULL) {
447 serv->sv_function = func; 446 serv->sv_function = func;