From patchwork Wed Aug 14 15:59:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Adamson X-Patchwork-Id: 2844635 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 39BECBF546 for ; Wed, 14 Aug 2013 15:59:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 28CEC20506 for ; Wed, 14 Aug 2013 15:59:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6CE98203EB for ; Wed, 14 Aug 2013 15:59:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751798Ab3HNP7Y (ORCPT ); Wed, 14 Aug 2013 11:59:24 -0400 Received: from mx12.netapp.com ([216.240.18.77]:65511 "EHLO mx12.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751244Ab3HNP7X (ORCPT ); Wed, 14 Aug 2013 11:59:23 -0400 X-IronPort-AV: E=Sophos;i="4.89,878,1367996400"; d="scan'208";a="81009155" Received: from vmwexceht04-prd.hq.netapp.com ([10.106.77.34]) by mx12-out.netapp.com with ESMTP; 14 Aug 2013 08:59:23 -0700 Received: from smtp1.corp.netapp.com (10.57.156.124) by VMWEXCEHT04-PRD.hq.netapp.com (10.106.77.34) with Microsoft SMTP Server id 14.3.123.3; Wed, 14 Aug 2013 08:59:22 -0700 Received: from fc19.androsad.fake (vpn2ntap-239304.vpn.netapp.com [10.55.75.40]) by smtp1.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id r7EFxLli001568; Wed, 14 Aug 2013 08:59:22 -0700 (PDT) From: To: CC: , Andy Adamson Subject: [PATCH Version 5 1/5] SUNRPC: don't map EKEYEXPIRED to EACCES in call_refreshresult Date: Wed, 14 Aug 2013 11:59:13 -0400 Message-ID: <1376495957-7482-2-git-send-email-andros@netapp.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1376495957-7482-1-git-send-email-andros@netapp.com> References: <1376495957-7482-1-git-send-email-andros@netapp.com> MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Andy Adamson The NFS layer needs to know when a key has expired. This change also returns -EKEYEXPIRED to the application, and the informative "Key has expired" error message is displayed. The user then knows that credential renewal is required. Signed-off-by: Andy Adamson --- net/sunrpc/clnt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index ecbc4e3..b544965 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -1423,9 +1423,9 @@ call_refreshresult(struct rpc_task *task) return; case -ETIMEDOUT: rpc_delay(task, 3*HZ); - case -EKEYEXPIRED: case -EAGAIN: status = -EACCES; + case -EKEYEXPIRED: if (!task->tk_cred_retry) break; task->tk_cred_retry--;