diff options
author | NeilBrown <neilb@suse.de> | 2006-10-02 05:17:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-02 10:57:17 -0400 |
commit | bc591ccff27e6a85d3a0d6fcb16cfadcc45267a8 (patch) | |
tree | 20692a805b32ce5541f7175192f8ab81975434ec /include/linux/sunrpc | |
parent | 40f10522173c34e56cb9bf2fd37c62f69a427f1b (diff) |
[PATCH] knfsd: add a callback for when last rpc thread finishes
nfsd has some cleanup that it wants to do when the last thread exits, and
there will shortly be some more. So collect this all into one place and
define a callback for an rpc service to call when the service is about to be
destroyed.
[akpm@osdl.org: cleanups, build fix]
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r-- | include/linux/sunrpc/svc.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 73140ee5c638..bff5e9b486c2 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
@@ -42,6 +42,11 @@ struct svc_serv { | |||
42 | int sv_tmpcnt; /* count of temporary sockets */ | 42 | int sv_tmpcnt; /* count of temporary sockets */ |
43 | 43 | ||
44 | char * sv_name; /* service name */ | 44 | char * sv_name; /* service name */ |
45 | |||
46 | void (*sv_shutdown)(struct svc_serv *serv); | ||
47 | /* Callback to use when last thread | ||
48 | * exits. | ||
49 | */ | ||
45 | }; | 50 | }; |
46 | 51 | ||
47 | /* | 52 | /* |
@@ -328,7 +333,8 @@ typedef void (*svc_thread_fn)(struct svc_rqst *); | |||
328 | /* | 333 | /* |
329 | * Function prototypes. | 334 | * Function prototypes. |
330 | */ | 335 | */ |
331 | struct svc_serv * svc_create(struct svc_program *, unsigned int); | 336 | struct svc_serv * svc_create(struct svc_program *, unsigned int, |
337 | void (*shutdown)(struct svc_serv*)); | ||
332 | int svc_create_thread(svc_thread_fn, struct svc_serv *); | 338 | int svc_create_thread(svc_thread_fn, struct svc_serv *); |
333 | void svc_exit_thread(struct svc_rqst *); | 339 | void svc_exit_thread(struct svc_rqst *); |
334 | void svc_destroy(struct svc_serv *); | 340 | void svc_destroy(struct svc_serv *); |