linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <andros@netapp.com>
To: <trond.myklebust@netapp.com>
Cc: <linux-nfs@vger.kernel.org>, Andy Adamson <andros@netapp.com>
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	[thread overview]
Message-ID: <1376495957-7482-2-git-send-email-andros@netapp.com> (raw)
In-Reply-To: <1376495957-7482-1-git-send-email-andros@netapp.com>

From: Andy Adamson <andros@netapp.com>

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 <andros@netapp.com>
---
 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--;
-- 
1.8.3.1


  reply	other threads:[~2013-08-14 15:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-14 15:59 [PATCH Version 5 0/5] Avoid expired credential keys for buffered writes andros
2013-08-14 15:59 ` andros [this message]
2013-09-03 16:07   ` [PATCH Version 5 1/5] SUNRPC: don't map EKEYEXPIRED to EACCES in call_refreshresult Myklebust, Trond
2013-08-14 15:59 ` [PATCH Version 5 2/5] NFS: Warn when attempting a buffered write or commit with an expired credential andros
2013-09-03 16:10   ` Myklebust, Trond
2013-08-14 15:59 ` [PATCH Version 5 3/5] SUNRPC new rpc_credops to test credential expiry andros
2013-09-03 16:12   ` Myklebust, Trond
2013-08-14 15:59 ` [PATCH Version 5 4/5] NFS avoid expired credential keys for buffered writes andros
2013-09-03 16:14   ` Myklebust, Trond
2013-08-14 15:59 ` [PATCH Version 5 5/5] SUNRPC refactor rpcauth_checkverf error returns andros

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=1376495957-7482-2-git-send-email-andros@netapp.com \
    --to=andros@netapp.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@netapp.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).