Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cee6a537 authored by Fred Isaman's avatar Fred Isaman Committed by Trond Myklebust
Browse files

RPC: remove check for impossible condition in rpc_make_runnable



queue_work() only returns 0 or 1, never a negative value.

Signed-off-by: default avatarFred Isaman <iisaman@netapp.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent f49f9baa
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -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);
}