Skip to content

Commit

Permalink
RPC: remove check for impossible condition in rpc_make_runnable
Browse files Browse the repository at this point in the history
queue_work() only returns 0 or 1, never a negative value.

Signed-off-by: Fred Isaman <[email protected]>
Signed-off-by: Trond Myklebust <[email protected]>
  • Loading branch information
Fred Isaman authored and Trond Myklebust committed Mar 11, 2011
1 parent f49f9ba commit cee6a53
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions net/sunrpc/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit cee6a53

Please sign in to comment.