]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/sunrpc/clnt.c
RPC: killing RPC tasks races fixed
[karo-tx-linux.git] / net / sunrpc / clnt.c
index 57d344cf2256b84af606ff42582c400b3736f00f..35d046b588f3fa54259a5fbcf6ee9e677db5ac13 100644 (file)
@@ -436,7 +436,9 @@ void rpc_killall_tasks(struct rpc_clnt *clnt)
                if (!(rovr->tk_flags & RPC_TASK_KILLED)) {
                        rovr->tk_flags |= RPC_TASK_KILLED;
                        rpc_exit(rovr, -EIO);
-                       rpc_wake_up_queued_task(rovr->tk_waitqueue, rovr);
+                       if (RPC_IS_QUEUED(rovr))
+                               rpc_wake_up_queued_task(rovr->tk_waitqueue,
+                                                       rovr);
                }
        }
        spin_unlock(&clnt->cl_lock);