From patchwork Thu Jul 7 14:32:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 953062 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p67EVXCo011985 for ; Thu, 7 Jul 2011 14:32:18 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756469Ab1GGOcS (ORCPT ); Thu, 7 Jul 2011 10:32:18 -0400 Received: from mail-yi0-f46.google.com ([209.85.218.46]:61889 "EHLO mail-yi0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756288Ab1GGOcR (ORCPT ); Thu, 7 Jul 2011 10:32:17 -0400 Received: by yia27 with SMTP id 27so394135yia.19 for ; Thu, 07 Jul 2011 07:32:17 -0700 (PDT) Received: by 10.91.63.21 with SMTP id q21mr980359agk.62.1310049136988; Thu, 07 Jul 2011 07:32:16 -0700 (PDT) Received: from salusa.poochiereds.net (cpe-076-182-054-018.nc.res.rr.com [76.182.54.18]) by mx.google.com with ESMTPS id h26sm4911488anp.13.2011.07.07.07.32.16 (version=SSLv3 cipher=OTHER); Thu, 07 Jul 2011 07:32:16 -0700 (PDT) From: Jeff Layton To: Trond.Myklebust@netapp.com Cc: linux-nfs@vger.kernel.org Subject: [PATCH] sunrpc: when call_bind fails with -EACCES, don't exit with -EIO Date: Thu, 7 Jul 2011 10:32:13 -0400 Message-Id: <1310049133-10255-1-git-send-email-jlayton@redhat.com> X-Mailer: git-send-email 1.7.6 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 (demeter2.kernel.org [140.211.167.43]); Thu, 07 Jul 2011 14:32:18 +0000 (UTC) Commit 0b760113a fixed the client not to loop indefinitely if the rpcbind was continually failing. When this occurs though, the rpc_task now exits with a status of -EIO. If the tk_status is -EACCES, it seems like we should preserve that in this situation. Signed-off-by: Jeff Layton --- net/sunrpc/clnt.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 8c91415..77f6c0c 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -1175,8 +1175,10 @@ call_bind_status(struct rpc_task *task) status = -EOPNOTSUPP; break; } - if (task->tk_rebind_retry == 0) + if (task->tk_rebind_retry == 0) { + status = task->tk_status; break; + } task->tk_rebind_retry--; rpc_delay(task, 3*HZ); goto retry_timeout;