diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2008-06-30 18:45:30 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2008-09-29 17:56:56 -0400 |
commit | e851db5b05408b89b9a9429a66814b79fabee2a1 (patch) | |
tree | 99bac979ed90efed99c89a49cb77719ab4c0a229 /net | |
parent | 72d31053f62c4bc464c2783974926969614a8649 (diff) |
SUNRPC: Add address family field to svc_serv data structure
Introduce and initialize an address family field in the svc_serv structure.
This field will determine what family to use for the service's listener
sockets and what families are advertised via the local rpcbind daemon.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/svc.c | 11 |
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 | */ |
358 | static struct svc_serv * | 358 | static 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 | ||
426 | struct svc_serv * | 427 | struct svc_serv * |
427 | svc_create(struct svc_program *prog, unsigned int bufsize, | 428 | svc_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 | } |
432 | EXPORT_SYMBOL(svc_create); | 433 | EXPORT_SYMBOL(svc_create); |
433 | 434 | ||
434 | struct svc_serv * | 435 | struct svc_serv * |
435 | svc_create_pooled(struct svc_program *prog, unsigned int bufsize, | 436 | svc_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; |