diff options
author | Stanislav Kinsbursky <skinsbursky@parallels.com> | 2012-01-13 05:03:04 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-01-31 19:28:14 -0500 |
commit | 5ecebb7c7fd737cf387a552994df319c063973db (patch) | |
tree | 5442ab61f417961b8908f1d2e82f837204830b80 /include | |
parent | bee42f688c915b510a4aabae4f7a99457137d6f3 (diff) |
SUNRPC: unregister service on creation in current network namespace
On service shutdown we can be sure, that no more users of it left except
current. Thus it looks like using current network namespace context is safe in
this case.
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/sunrpc/svc.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index d3563c2a5808..7b65495aa4ef 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
@@ -84,7 +84,8 @@ struct svc_serv { | |||
84 | unsigned int sv_nrpools; /* number of thread pools */ | 84 | unsigned int sv_nrpools; /* number of thread pools */ |
85 | struct svc_pool * sv_pools; /* array of thread pools */ | 85 | struct svc_pool * sv_pools; /* array of thread pools */ |
86 | 86 | ||
87 | void (*sv_shutdown)(struct svc_serv *serv); | 87 | void (*sv_shutdown)(struct svc_serv *serv, |
88 | struct net *net); | ||
88 | /* Callback to use when last thread | 89 | /* Callback to use when last thread |
89 | * exits. | 90 | * exits. |
90 | */ | 91 | */ |
@@ -413,14 +414,14 @@ struct svc_procedure { | |||
413 | /* | 414 | /* |
414 | * Function prototypes. | 415 | * Function prototypes. |
415 | */ | 416 | */ |
416 | void svc_rpcb_cleanup(struct svc_serv *serv); | 417 | void svc_rpcb_cleanup(struct svc_serv *serv, struct net *net); |
417 | struct svc_serv *svc_create(struct svc_program *, unsigned int, | 418 | struct svc_serv *svc_create(struct svc_program *, unsigned int, |
418 | void (*shutdown)(struct svc_serv *)); | 419 | void (*shutdown)(struct svc_serv *, struct net *net)); |
419 | struct svc_rqst *svc_prepare_thread(struct svc_serv *serv, | 420 | struct svc_rqst *svc_prepare_thread(struct svc_serv *serv, |
420 | struct svc_pool *pool, int node); | 421 | struct svc_pool *pool, int node); |
421 | void svc_exit_thread(struct svc_rqst *); | 422 | void svc_exit_thread(struct svc_rqst *); |
422 | struct svc_serv * svc_create_pooled(struct svc_program *, unsigned int, | 423 | struct svc_serv * svc_create_pooled(struct svc_program *, unsigned int, |
423 | void (*shutdown)(struct svc_serv *), | 424 | void (*shutdown)(struct svc_serv *, struct net *net), |
424 | svc_thread_fn, struct module *); | 425 | svc_thread_fn, struct module *); |
425 | int svc_set_num_threads(struct svc_serv *, struct svc_pool *, int); | 426 | int svc_set_num_threads(struct svc_serv *, struct svc_pool *, int); |
426 | int svc_pool_stats_open(struct svc_serv *serv, struct file *file); | 427 | int svc_pool_stats_open(struct svc_serv *serv, struct file *file); |