diff options
Diffstat (limited to 'net/sunrpc/svc.c')
-rw-r--r-- | net/sunrpc/svc.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index 01c7e311b904..7bffaff2a3ab 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c | |||
@@ -461,7 +461,8 @@ svc_create_pooled(struct svc_program *prog, unsigned int bufsize, | |||
461 | EXPORT_SYMBOL(svc_create_pooled); | 461 | EXPORT_SYMBOL(svc_create_pooled); |
462 | 462 | ||
463 | /* | 463 | /* |
464 | * Destroy an RPC service. Should be called with the BKL held | 464 | * Destroy an RPC service. Should be called with appropriate locking to |
465 | * protect the sv_nrthreads, sv_permsocks and sv_tempsocks. | ||
465 | */ | 466 | */ |
466 | void | 467 | void |
467 | svc_destroy(struct svc_serv *serv) | 468 | svc_destroy(struct svc_serv *serv) |
@@ -578,9 +579,10 @@ out_enomem: | |||
578 | EXPORT_SYMBOL(svc_prepare_thread); | 579 | EXPORT_SYMBOL(svc_prepare_thread); |
579 | 580 | ||
580 | /* | 581 | /* |
581 | * Create a thread in the given pool. Caller must hold BKL. | 582 | * Create a thread in the given pool. Caller must hold BKL or another lock to |
582 | * On a NUMA or SMP machine, with a multi-pool serv, the thread | 583 | * serialize access to the svc_serv struct. On a NUMA or SMP machine, with a |
583 | * will be restricted to run on the cpus belonging to the pool. | 584 | * multi-pool serv, the thread will be restricted to run on the cpus belonging |
585 | * to the pool. | ||
584 | */ | 586 | */ |
585 | static int | 587 | static int |
586 | __svc_create_thread(svc_thread_fn func, struct svc_serv *serv, | 588 | __svc_create_thread(svc_thread_fn func, struct svc_serv *serv, |
@@ -674,7 +676,7 @@ found_pool: | |||
674 | * of threads the given number. If `pool' is non-NULL, applies | 676 | * of threads the given number. If `pool' is non-NULL, applies |
675 | * only to threads in that pool, otherwise round-robins between | 677 | * only to threads in that pool, otherwise round-robins between |
676 | * all pools. Must be called with a svc_get() reference and | 678 | * all pools. Must be called with a svc_get() reference and |
677 | * the BKL held. | 679 | * the BKL or another lock to protect access to svc_serv fields. |
678 | * | 680 | * |
679 | * Destroying threads relies on the service threads filling in | 681 | * Destroying threads relies on the service threads filling in |
680 | * rqstp->rq_task, which only the nfs ones do. Assumes the serv | 682 | * rqstp->rq_task, which only the nfs ones do. Assumes the serv |
@@ -722,7 +724,8 @@ svc_set_num_threads(struct svc_serv *serv, struct svc_pool *pool, int nrservs) | |||
722 | EXPORT_SYMBOL(svc_set_num_threads); | 724 | EXPORT_SYMBOL(svc_set_num_threads); |
723 | 725 | ||
724 | /* | 726 | /* |
725 | * Called from a server thread as it's exiting. Caller must hold BKL. | 727 | * Called from a server thread as it's exiting. Caller must hold the BKL or |
728 | * the "service mutex", whichever is appropriate for the service. | ||
726 | */ | 729 | */ |
727 | void | 730 | void |
728 | svc_exit_thread(struct svc_rqst *rqstp) | 731 | svc_exit_thread(struct svc_rqst *rqstp) |