From patchwork Fri Feb 11 15:42:36 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fred Isaman X-Patchwork-Id: 549821 X-Patchwork-Delegate: Trond.Myklebust@netapp.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p1BFgmxK009001 for ; Fri, 11 Feb 2011 15:42:50 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757168Ab1BKPmr (ORCPT ); Fri, 11 Feb 2011 10:42:47 -0500 Received: from mx2.netapp.com ([216.240.18.37]:34575 "EHLO mx2.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757209Ab1BKPmq (ORCPT ); Fri, 11 Feb 2011 10:42:46 -0500 X-IronPort-AV: E=Sophos;i="4.60,455,1291622400"; d="scan'208";a="517210974" Received: from smtp1.corp.netapp.com ([10.57.156.124]) by mx2-out.netapp.com with ESMTP; 11 Feb 2011 07:42:46 -0800 Received: from localhost.localdomain (manjua-lxp.hq.netapp.com [10.58.49.248] (may be forged)) by smtp1.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id p1BFgicK002511; Fri, 11 Feb 2011 07:42:46 -0800 (PST) From: Fred Isaman To: linux-nfs@vger.kernel.org Cc: Trond Myklebust , "J. Bruce Fields" Subject: [PATCH 2/4] RPC: clarify rpc_run_task error handling Date: Fri, 11 Feb 2011 10:42:36 -0500 Message-Id: <1297438958-24861-3-git-send-email-iisaman@netapp.com> X-Mailer: git-send-email 1.7.2.1 In-Reply-To: <1297438958-24861-1-git-send-email-iisaman@netapp.com> References: <1297438958-24861-1-git-send-email-iisaman@netapp.com> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 11 Feb 2011 15:42:50 +0000 (UTC) diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 57d344c..8b5a6b4 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -636,12 +636,6 @@ struct rpc_task *rpc_run_task(const struct rpc_task_setup *task_setup_data) rpc_task_set_client(task, task_setup_data->rpc_client); rpc_task_set_rpc_message(task, task_setup_data->rpc_message); - if (task->tk_status != 0) { - int ret = task->tk_status; - rpc_put_task(task); - return ERR_PTR(ret); - } - if (task->tk_action == NULL) rpc_call_start(task); diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index bb8f54f..a3f6d97 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c @@ -822,12 +822,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;