From patchwork Thu Jul 18 19:35:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Adamson X-Patchwork-Id: 2829782 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7704A9FA41 for ; Thu, 18 Jul 2013 19:35:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9ED042015A for ; Thu, 18 Jul 2013 19:35:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B3F75200F8 for ; Thu, 18 Jul 2013 19:35:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759354Ab3GRTfn (ORCPT ); Thu, 18 Jul 2013 15:35:43 -0400 Received: from mx11.netapp.com ([216.240.18.76]:41089 "EHLO mx11.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759317Ab3GRTfn (ORCPT ); Thu, 18 Jul 2013 15:35:43 -0400 X-IronPort-AV: E=Sophos;i="4.89,696,1367996400"; d="scan'208";a="34773124" Received: from vmwexceht02-prd.hq.netapp.com ([10.106.76.240]) by mx11-out.netapp.com with ESMTP; 18 Jul 2013 12:35:39 -0700 Received: from smtp1.corp.netapp.com (10.57.156.124) by VMWEXCEHT02-PRD.hq.netapp.com (10.106.76.240) with Microsoft SMTP Server id 14.3.123.3; Thu, 18 Jul 2013 12:35:38 -0700 Received: from fc19.androsad.fake (vpn2ntap-178991.vpn.netapp.com [10.55.73.80]) by smtp1.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id r6IJZbRH021126; Thu, 18 Jul 2013 12:35:38 -0700 (PDT) From: To: CC: , Andy Adamson Subject: [PATCH Version 4 1/5] SUNRPC: don't map EKEYEXPIRED to EACCES in call_refreshresult Date: Thu, 18 Jul 2013 15:35:26 -0400 Message-ID: <1374176130-11657-2-git-send-email-andros@netapp.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1374176130-11657-1-git-send-email-andros@netapp.com> References: <1374176130-11657-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=-7.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 aa40156..68e8595 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -1426,9 +1426,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--;