From: Jeff Layton Date: Mon, 23 Jul 2012 19:51:55 +0000 (-0400) Subject: sunrpc: clarify comments on rpc_make_runnable X-Git-Tag: v3.4.83~23 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e8d5ce17375e2ece50659f287ad1a3daf2335d7e;p=thirdparty%2Fkernel%2Fstable.git sunrpc: clarify comments on rpc_make_runnable commit 506026c3ec270e18402f0c9d33fee37482c23861 upstream. rpc_make_runnable is not generally called with the queue lock held, unless it's waking up a task that has been sitting on a waitqueue. This is safe when the task has not entered the FSM yet, but the comments don't really spell this out. Signed-off-by: Jeff Layton Signed-off-by: Trond Myklebust Signed-off-by: Ben Hutchings Cc: Weng Meiling Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index 72d89e129caa8..38cca3259f3a2 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c @@ -302,8 +302,9 @@ EXPORT_SYMBOL_GPL(__rpc_wait_for_completion_task); /* * Make an RPC task runnable. * - * Note: If the task is ASYNC, this must be called with - * the spinlock held to protect the wait queue operation. + * Note: If the task is ASYNC, and is being made runnable after sitting on an + * rpc_wait_queue, this must be called with the queue spinlock held to protect + * the wait queue operation. */ static void rpc_make_runnable(struct rpc_task *task) {