Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 254913
b: refs/heads/master
c: b55c598
h: refs/heads/master
i:
  254911: 491319e
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Jul 8, 2011
1 parent 6b2f815 commit c61011a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2bea038c52e88badbbd5b420c1de918f7f2579e9
refs/heads/master: b55c59892e1f3b6c7d4b9ccffb4263e1486fb990
27 changes: 11 additions & 16 deletions trunk/net/sunrpc/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -616,30 +616,25 @@ static void __rpc_execute(struct rpc_task *task)
BUG_ON(RPC_IS_QUEUED(task));

for (;;) {
void (*do_action)(struct rpc_task *);

/*
* Execute any pending callback.
* Execute any pending callback first.
*/
if (task->tk_callback) {
void (*save_callback)(struct rpc_task *);

/*
* We set tk_callback to NULL before calling it,
* in case it sets the tk_callback field itself:
*/
save_callback = task->tk_callback;
task->tk_callback = NULL;
save_callback(task);
} else {
do_action = task->tk_callback;
task->tk_callback = NULL;
if (do_action == NULL) {
/*
* Perform the next FSM step.
* tk_action may be NULL when the task has been killed
* by someone else.
* tk_action may be NULL if the task has been killed.
* In particular, note that rpc_killall_tasks may
* do this at any time, so beware when dereferencing.
*/
if (task->tk_action == NULL)
do_action = task->tk_action;
if (do_action == NULL)
break;
task->tk_action(task);
}
do_action(task);

/*
* Lockless check for whether task is sleeping or not.
Expand Down

0 comments on commit c61011a

Please sign in to comment.