Commit 506026c3ec270e18402f0c9d33fee37482c23861

Authored by Jeff Layton
Committed by Trond Myklebust
1 parent 159e0561e3

sunrpc: clarify comments on rpc_make_runnable

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>

Showing 1 changed file with 3 additions and 2 deletions Side-by-side Diff

... ... @@ -300,8 +300,9 @@
300 300 /*
301 301 * Make an RPC task runnable.
302 302 *
303   - * Note: If the task is ASYNC, this must be called with
304   - * the spinlock held to protect the wait queue operation.
  303 + * Note: If the task is ASYNC, and is being made runnable after sitting on an
  304 + * rpc_wait_queue, this must be called with the queue spinlock held to protect
  305 + * the wait queue operation.
305 306 */
306 307 static void rpc_make_runnable(struct rpc_task *task)
307 308 {