aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2008-06-10 08:40:39 -0400
committerJ. Bruce Fields <bfields@citi.umich.edu>2008-06-23 13:02:49 -0400
commita75c5d01e4235a7dd785548ac756f248b1b40107 (patch)
tree602c517b868a219d184e42d23cda4e834396c8ca
parent9867d76ca16b3f455f9ca83861f4ce5c94a25928 (diff)
sunrpc: remove sv_kill_signal field from svc_serv struct
Since we no longer make any distinction between shutdown signals with nfsd, then it becomes easier to just standardize on a particular signal to use to bring it down (SIGINT, in this case). Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
-rw-r--r--fs/nfsd/nfssvc.c3
-rw-r--r--include/linux/sunrpc/svc.h5
-rw-r--r--net/sunrpc/svc.c5
3 files changed, 5 insertions, 8 deletions
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
index 9e2156813710..26c81149d49a 100644
--- a/fs/nfsd/nfssvc.c
+++ b/fs/nfsd/nfssvc.c
@@ -236,8 +236,7 @@ int nfsd_create_serv(void)
236 236
237 atomic_set(&nfsd_busy, 0); 237 atomic_set(&nfsd_busy, 0);
238 nfsd_serv = svc_create_pooled(&nfsd_program, nfsd_max_blksize, 238 nfsd_serv = svc_create_pooled(&nfsd_program, nfsd_max_blksize,
239 nfsd_last_thread, nfsd, SIGINT, 239 nfsd_last_thread, nfsd, THIS_MODULE);
240 THIS_MODULE);
241 if (nfsd_serv == NULL) 240 if (nfsd_serv == NULL)
242 err = -ENOMEM; 241 err = -ENOMEM;
243 242
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index 011d6d8100d8..dc69068d94c7 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -80,7 +80,6 @@ struct svc_serv {
80 struct module * sv_module; /* optional module to count when 80 struct module * sv_module; /* optional module to count when
81 * adding threads */ 81 * adding threads */
82 svc_thread_fn sv_function; /* main function for threads */ 82 svc_thread_fn sv_function; /* main function for threads */
83 int sv_kill_signal; /* signal to kill threads */
84}; 83};
85 84
86/* 85/*
@@ -388,8 +387,8 @@ struct svc_rqst *svc_prepare_thread(struct svc_serv *serv,
388 struct svc_pool *pool); 387 struct svc_pool *pool);
389void svc_exit_thread(struct svc_rqst *); 388void svc_exit_thread(struct svc_rqst *);
390struct svc_serv * svc_create_pooled(struct svc_program *, unsigned int, 389struct svc_serv * svc_create_pooled(struct svc_program *, unsigned int,
391 void (*shutdown)(struct svc_serv*), 390 void (*shutdown)(struct svc_serv*), svc_thread_fn,
392 svc_thread_fn, int sig, struct module *); 391 struct module *);
393int svc_set_num_threads(struct svc_serv *, struct svc_pool *, int); 392int svc_set_num_threads(struct svc_serv *, struct svc_pool *, int);
394void svc_destroy(struct svc_serv *); 393void svc_destroy(struct svc_serv *);
395int svc_process(struct svc_rqst *); 394int svc_process(struct svc_rqst *);
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index 03a9f1a9e75c..5a32cb7c4bb4 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -434,7 +434,7 @@ EXPORT_SYMBOL(svc_create);
434struct svc_serv * 434struct svc_serv *
435svc_create_pooled(struct svc_program *prog, unsigned int bufsize, 435svc_create_pooled(struct svc_program *prog, unsigned int bufsize,
436 void (*shutdown)(struct svc_serv *serv), 436 void (*shutdown)(struct svc_serv *serv),
437 svc_thread_fn func, int sig, struct module *mod) 437 svc_thread_fn func, struct module *mod)
438{ 438{
439 struct svc_serv *serv; 439 struct svc_serv *serv;
440 unsigned int npools = svc_pool_map_get(); 440 unsigned int npools = svc_pool_map_get();
@@ -443,7 +443,6 @@ svc_create_pooled(struct svc_program *prog, unsigned int bufsize,
443 443
444 if (serv != NULL) { 444 if (serv != NULL) {
445 serv->sv_function = func; 445 serv->sv_function = func;
446 serv->sv_kill_signal = sig;
447 serv->sv_module = mod; 446 serv->sv_module = mod;
448 } 447 }
449 448
@@ -683,7 +682,7 @@ svc_set_num_threads(struct svc_serv *serv, struct svc_pool *pool, int nrservs)
683 /* destroy old threads */ 682 /* destroy old threads */
684 while (nrservs < 0 && 683 while (nrservs < 0 &&
685 (task = choose_victim(serv, pool, &state)) != NULL) { 684 (task = choose_victim(serv, pool, &state)) != NULL) {
686 send_sig(serv->sv_kill_signal, task, 1); 685 send_sig(SIGINT, task, 1);
687 nrservs++; 686 nrservs++;
688 } 687 }
689 688