aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/sunrpc/svc.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index 5a32cb7c4bb4..9ba17044109d 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -357,7 +357,7 @@ svc_pool_for_cpu(struct svc_serv *serv, int cpu)
357 */ 357 */
358static struct svc_serv * 358static struct svc_serv *
359__svc_create(struct svc_program *prog, unsigned int bufsize, int npools, 359__svc_create(struct svc_program *prog, unsigned int bufsize, int npools,
360 void (*shutdown)(struct svc_serv *serv)) 360 sa_family_t family, void (*shutdown)(struct svc_serv *serv))
361{ 361{
362 struct svc_serv *serv; 362 struct svc_serv *serv;
363 unsigned int vers; 363 unsigned int vers;
@@ -366,6 +366,7 @@ __svc_create(struct svc_program *prog, unsigned int bufsize, int npools,
366 366
367 if (!(serv = kzalloc(sizeof(*serv), GFP_KERNEL))) 367 if (!(serv = kzalloc(sizeof(*serv), GFP_KERNEL)))
368 return NULL; 368 return NULL;
369 serv->sv_family = family;
369 serv->sv_name = prog->pg_name; 370 serv->sv_name = prog->pg_name;
370 serv->sv_program = prog; 371 serv->sv_program = prog;
371 serv->sv_nrthreads = 1; 372 serv->sv_nrthreads = 1;
@@ -425,21 +426,21 @@ __svc_create(struct svc_program *prog, unsigned int bufsize, int npools,
425 426
426struct svc_serv * 427struct svc_serv *
427svc_create(struct svc_program *prog, unsigned int bufsize, 428svc_create(struct svc_program *prog, unsigned int bufsize,
428 void (*shutdown)(struct svc_serv *serv)) 429 sa_family_t family, void (*shutdown)(struct svc_serv *serv))
429{ 430{
430 return __svc_create(prog, bufsize, /*npools*/1, shutdown); 431 return __svc_create(prog, bufsize, /*npools*/1, family, shutdown);
431} 432}
432EXPORT_SYMBOL(svc_create); 433EXPORT_SYMBOL(svc_create);
433 434
434struct svc_serv * 435struct svc_serv *
435svc_create_pooled(struct svc_program *prog, unsigned int bufsize, 436svc_create_pooled(struct svc_program *prog, unsigned int bufsize,
436 void (*shutdown)(struct svc_serv *serv), 437 sa_family_t family, void (*shutdown)(struct svc_serv *serv),
437 svc_thread_fn func, struct module *mod) 438 svc_thread_fn func, struct module *mod)
438{ 439{
439 struct svc_serv *serv; 440 struct svc_serv *serv;
440 unsigned int npools = svc_pool_map_get(); 441 unsigned int npools = svc_pool_map_get();
441 442
442 serv = __svc_create(prog, bufsize, npools, shutdown); 443 serv = __svc_create(prog, bufsize, npools, family, shutdown);
443 444
444 if (serv != NULL) { 445 if (serv != NULL) {
445 serv->sv_function = func; 446 serv->sv_function = func;