Skip to content

Commit

Permalink
sunrpc: clarify comments on rpc_make_runnable
Browse files Browse the repository at this point in the history
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 <jlayton@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
jtlayton authored and Trond Myklebust committed Jul 30, 2012
1 parent 159e056 commit 506026c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions net/sunrpc/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,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)
{
Expand Down

0 comments on commit 506026c

Please sign in to comment.