diff options
author | \\\"J. Bruce Fields\\\ <bfields@citi.umich.edu> | 2008-06-09 16:51:35 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-07-09 12:09:14 -0400 |
commit | a486aeda9b2b0d944aecce7871b3186379b898de (patch) | |
tree | 724ee69f012083efcd379733ba783efbe6341ab2 /net/sunrpc/sched.c | |
parent | d25a03cf966f2cf9990dc0bf2a921a554919ea34 (diff) | |
download | linux-a486aeda9b2b0d944aecce7871b3186379b898de.tar.gz linux-a486aeda9b2b0d944aecce7871b3186379b898de.tar.bz2 linux-a486aeda9b2b0d944aecce7871b3186379b898de.zip |
rpc: minor cleanup of scheduler callback code
Try to make the comment here a little more clear and concise.
Also, this macro definition seems unnecessary.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/sched.c')
-rw-r--r-- | net/sunrpc/sched.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index 6eab9bf94baf..6288af05c20f 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c @@ -626,19 +626,15 @@ static void __rpc_execute(struct rpc_task *task) /* * Execute any pending callback. */ - if (RPC_DO_CALLBACK(task)) { - /* Define a callback save pointer */ + if (task->tk_callback) { void (*save_callback)(struct rpc_task *); /* - * If a callback exists, save it, reset it, - * call it. - * The save is needed to stop from resetting - * another callback set within the callback handler - * - Dave + * 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->tk_callback; + task->tk_callback = NULL; save_callback(task); } |