Skip to content

Commit 3c51991

Browse files
Jeff LaytonJ. Bruce Fields
authored andcommitted
sunrpc/lockd: fix references to the BKL
The BKL is completely out of the picture in the lockd and sunrpc code these days. Update the antiquated comments that refer to it. Signed-off-by: Jeff Layton <jlayton@primarydata.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
1 parent bbc7f33 commit 3c51991

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

fs/lockd/svclock.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ static DEFINE_SPINLOCK(nlm_blocked_lock);
5757
static const char *nlmdbg_cookie2a(const struct nlm_cookie *cookie)
5858
{
5959
/*
60-
* We can get away with a static buffer because we're only
61-
* called with BKL held.
60+
* We can get away with a static buffer because this is only called
61+
* from lockd, which is single-threaded.
6262
*/
6363
static char buf[2*NLM_MAXCOOKIELEN+1];
6464
unsigned int i, len = sizeof(buf);

include/linux/sunrpc/svc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ struct svc_serv {
110110
* We use sv_nrthreads as a reference count. svc_destroy() drops
111111
* this refcount, so we need to bump it up around operations that
112112
* change the number of threads. Horrible, but there it is.
113-
* Should be called with the BKL held.
113+
* Should be called with the "service mutex" held.
114114
*/
115115
static inline void svc_get(struct svc_serv *serv)
116116
{

net/sunrpc/svc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -768,8 +768,8 @@ svc_set_num_threads(struct svc_serv *serv, struct svc_pool *pool, int nrservs)
768768
EXPORT_SYMBOL_GPL(svc_set_num_threads);
769769

770770
/*
771-
* Called from a server thread as it's exiting. Caller must hold the BKL or
772-
* the "service mutex", whichever is appropriate for the service.
771+
* Called from a server thread as it's exiting. Caller must hold the "service
772+
* mutex" for the service.
773773
*/
774774
void
775775
svc_exit_thread(struct svc_rqst *rqstp)

net/sunrpc/svc_xprt.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ static LIST_HEAD(svc_xprt_class_list);
4242
* svc_pool->sp_lock protects most of the fields of that pool.
4343
* svc_serv->sv_lock protects sv_tempsocks, sv_permsocks, sv_tmpcnt.
4444
* when both need to be taken (rare), svc_serv->sv_lock is first.
45-
* BKL protects svc_serv->sv_nrthread.
45+
* The "service mutex" protects svc_serv->sv_nrthread.
4646
* svc_sock->sk_lock protects the svc_sock->sk_deferred list
4747
* and the ->sk_info_authunix cache.
4848
*
@@ -67,7 +67,6 @@ static LIST_HEAD(svc_xprt_class_list);
6767
* that no other thread will be using the transport or will
6868
* try to set XPT_DEAD.
6969
*/
70-
7170
int svc_reg_xprt_class(struct svc_xprt_class *xcl)
7271
{
7372
struct svc_xprt_class *cl;

0 commit comments

Comments
 (0)