diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/sched.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index a1ab4eed41f4..b57d4062d429 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c | |||
@@ -295,13 +295,15 @@ EXPORT_SYMBOL(__rpc_wait_for_completion_task); | |||
295 | */ | 295 | */ |
296 | static void rpc_make_runnable(struct rpc_task *task) | 296 | static void rpc_make_runnable(struct rpc_task *task) |
297 | { | 297 | { |
298 | int do_ret; | ||
299 | |||
300 | BUG_ON(task->tk_timeout_fn); | 298 | BUG_ON(task->tk_timeout_fn); |
301 | do_ret = rpc_test_and_set_running(task); | ||
302 | rpc_clear_queued(task); | 299 | rpc_clear_queued(task); |
303 | if (do_ret) | 300 | if (rpc_test_and_set_running(task)) |
301 | return; | ||
302 | /* We might have raced */ | ||
303 | if (RPC_IS_QUEUED(task)) { | ||
304 | rpc_clear_running(task); | ||
304 | return; | 305 | return; |
306 | } | ||
305 | if (RPC_IS_ASYNC(task)) { | 307 | if (RPC_IS_ASYNC(task)) { |
306 | int status; | 308 | int status; |
307 | 309 | ||