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>
This commit is contained in:
parent
9867d76ca1
commit
a75c5d01e4
3 changed files with 5 additions and 8 deletions
|
@ -236,8 +236,7 @@ int nfsd_create_serv(void)
|
||||||
|
|
||||||
atomic_set(&nfsd_busy, 0);
|
atomic_set(&nfsd_busy, 0);
|
||||||
nfsd_serv = svc_create_pooled(&nfsd_program, nfsd_max_blksize,
|
nfsd_serv = svc_create_pooled(&nfsd_program, nfsd_max_blksize,
|
||||||
nfsd_last_thread, nfsd, SIGINT,
|
nfsd_last_thread, nfsd, THIS_MODULE);
|
||||||
THIS_MODULE);
|
|
||||||
if (nfsd_serv == NULL)
|
if (nfsd_serv == NULL)
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,6 @@ struct svc_serv {
|
||||||
struct module * sv_module; /* optional module to count when
|
struct module * sv_module; /* optional module to count when
|
||||||
* adding threads */
|
* adding threads */
|
||||||
svc_thread_fn sv_function; /* main function for threads */
|
svc_thread_fn sv_function; /* main function for threads */
|
||||||
int sv_kill_signal; /* signal to kill threads */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -388,8 +387,8 @@ struct svc_rqst *svc_prepare_thread(struct svc_serv *serv,
|
||||||
struct svc_pool *pool);
|
struct svc_pool *pool);
|
||||||
void svc_exit_thread(struct svc_rqst *);
|
void svc_exit_thread(struct svc_rqst *);
|
||||||
struct svc_serv * svc_create_pooled(struct svc_program *, unsigned int,
|
struct svc_serv * svc_create_pooled(struct svc_program *, unsigned int,
|
||||||
void (*shutdown)(struct svc_serv*),
|
void (*shutdown)(struct svc_serv*), svc_thread_fn,
|
||||||
svc_thread_fn, int sig, struct module *);
|
struct module *);
|
||||||
int svc_set_num_threads(struct svc_serv *, struct svc_pool *, int);
|
int svc_set_num_threads(struct svc_serv *, struct svc_pool *, int);
|
||||||
void svc_destroy(struct svc_serv *);
|
void svc_destroy(struct svc_serv *);
|
||||||
int svc_process(struct svc_rqst *);
|
int svc_process(struct svc_rqst *);
|
||||||
|
|
|
@ -434,7 +434,7 @@ EXPORT_SYMBOL(svc_create);
|
||||||
struct svc_serv *
|
struct svc_serv *
|
||||||
svc_create_pooled(struct svc_program *prog, unsigned int bufsize,
|
svc_create_pooled(struct svc_program *prog, unsigned int bufsize,
|
||||||
void (*shutdown)(struct svc_serv *serv),
|
void (*shutdown)(struct svc_serv *serv),
|
||||||
svc_thread_fn func, int sig, struct module *mod)
|
svc_thread_fn func, struct module *mod)
|
||||||
{
|
{
|
||||||
struct svc_serv *serv;
|
struct svc_serv *serv;
|
||||||
unsigned int npools = svc_pool_map_get();
|
unsigned int npools = svc_pool_map_get();
|
||||||
|
@ -443,7 +443,6 @@ svc_create_pooled(struct svc_program *prog, unsigned int bufsize,
|
||||||
|
|
||||||
if (serv != NULL) {
|
if (serv != NULL) {
|
||||||
serv->sv_function = func;
|
serv->sv_function = func;
|
||||||
serv->sv_kill_signal = sig;
|
|
||||||
serv->sv_module = mod;
|
serv->sv_module = mod;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -683,7 +682,7 @@ svc_set_num_threads(struct svc_serv *serv, struct svc_pool *pool, int nrservs)
|
||||||
/* destroy old threads */
|
/* destroy old threads */
|
||||||
while (nrservs < 0 &&
|
while (nrservs < 0 &&
|
||||||
(task = choose_victim(serv, pool, &state)) != NULL) {
|
(task = choose_victim(serv, pool, &state)) != NULL) {
|
||||||
send_sig(serv->sv_kill_signal, task, 1);
|
send_sig(SIGINT, task, 1);
|
||||||
nrservs++;
|
nrservs++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue