]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - net/sunrpc/sched.c
Merge branch 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
[mv-sheeva.git] / net / sunrpc / sched.c
index 59e599498e37ffcd25a0c298de1030b78a13d516..ffb687671da0545866739ad4c6e69c5155976beb 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);
 }
@@ -637,14 +630,12 @@ static void __rpc_execute(struct rpc_task *task)
                        save_callback = task->tk_callback;
                        task->tk_callback = NULL;
                        save_callback(task);
-               }
-
-               /*
-                * Perform the next FSM step.
-                * tk_action may be NULL when the task has been killed
-                * by someone else.
-                */
-               if (!RPC_IS_QUEUED(task)) {
+               } else {
+                       /*
+                        * Perform the next FSM step.
+                        * tk_action may be NULL when the task has been killed
+                        * by someone else.
+                        */
                        if (task->tk_action == NULL)
                                break;
                        task->tk_action(task);
@@ -843,12 +834,6 @@ struct rpc_task *rpc_new_task(const struct rpc_task_setup *setup_data)
        }
 
        rpc_init_task(task, setup_data);
-       if (task->tk_status < 0) {
-               int err = task->tk_status;
-               rpc_put_task(task);
-               return ERR_PTR(err);
-       }
-
        task->tk_flags |= flags;
        dprintk("RPC:       allocated task %p\n", task);
        return task;
@@ -955,7 +940,7 @@ static int rpciod_start(void)
         * Create the rpciod thread and wait for it to start.
         */
        dprintk("RPC:       creating workqueue rpciod\n");
-       wq = alloc_workqueue("rpciod", WQ_RESCUER, 0);
+       wq = alloc_workqueue("rpciod", WQ_MEM_RECLAIM, 0);
        rpciod_workqueue = wq;
        return rpciod_workqueue != NULL;
 }