RPC: remove check for impossible condition in rpc_make_runnable
authorFred Isaman <iisaman@netapp.com>
Fri, 11 Feb 2011 15:42:35 +0000 (15:42 +0000)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 11 Mar 2011 20:38:40 +0000 (15:38 -0500)
queue_work() only returns 0 or 1, never a negative value.

Signed-off-by: Fred Isaman <iisaman@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
net/sunrpc/sched.c

index 59e599498e37ffcd25a0c298de1030b78a13d516..93107265256d679ca3c3389245e2245c7b406ea1 100644 (file)
@@ -299,15 +299,8 @@ static void rpc_make_runnable(struct rpc_task *task)
        if (rpc_test_and_set_running(task))
                return;
        if (RPC_IS_ASYNC(task)) {
-               int status;
-
                INIT_WORK(&task->u.tk_work, rpc_async_schedule);
-               status = queue_work(rpciod_workqueue, &task->u.tk_work);
-               if (status < 0) {
-                       printk(KERN_WARNING "RPC: failed to add task to queue: error: %d!\n", status);
-                       task->tk_status = status;
-                       return;
-               }
+               queue_work(rpciod_workqueue, &task->u.tk_work);
        } else
                wake_up_bit(&task->tk_runstate, RPC_TASK_QUEUED);
 }