All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fred Isaman <iisaman@netapp.com>
To: linux-nfs@vger.kernel.org
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>,
	"J. Bruce Fields" <bfields@fieldses.org>
Subject: [PATCH 1/4] RPC: remove check for impossible condition in rpc_make_runnable
Date: Fri, 11 Feb 2011 10:42:35 -0500	[thread overview]
Message-ID: <1297438958-24861-2-git-send-email-iisaman@netapp.com> (raw)
In-Reply-To: <1297438958-24861-1-git-send-email-iisaman@netapp.com>

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

Signed-off-by: Fred Isaman <iisaman@netapp.com>
---
 net/sunrpc/sched.c |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c
index 243fc09..bb8f54f 100644
--- a/net/sunrpc/sched.c
+++ b/net/sunrpc/sched.c
@@ -285,15 +285,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);
 }
-- 
1.7.2.1


  reply	other threads:[~2011-02-11 15:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-11 15:42 [PATCH 0/4] NFS: clarify some NFS error handling Fred Isaman
2011-02-11 15:42 ` Fred Isaman [this message]
2011-02-11 15:42 ` [PATCH 2/4] RPC: clarify rpc_run_task " Fred Isaman
2011-02-11 15:42 ` [PATCH 3/4] NFS: remove pointless if statement in nfs_direct_write_result Fred Isaman
2011-02-11 15:42 ` [PATCH 4/4] NFS: change nfs_writeback_done to return void Fred Isaman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1297438958-24861-2-git-send-email-iisaman@netapp.com \
    --to=iisaman@netapp.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=bfields@fieldses.org \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.