All of lore.kernel.org
 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 4 1/5] SUNRPC: don't map EKEYEXPIRED to EACCES in call_refreshresult
Date: Thu, 18 Jul 2013 15:35:26 -0400	[thread overview]
Message-ID: <1374176130-11657-2-git-send-email-andros@netapp.com> (raw)
In-Reply-To: <1374176130-11657-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 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--;
-- 
1.8.3.1


  reply	other threads:[~2013-07-18 19:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-18 19:35 [PATCH Version 4 0/5] Avoid expired credential keys for buffered writes andros
2013-07-18 19:35 ` andros [this message]
2013-07-18 19:35 ` [PATCH Version 4 2/5] NFS: Warn when attempting a buffered write or commit with an expired credential andros
2013-08-07 18:54   ` Myklebust, Trond
2013-07-18 19:35 ` [PATCH Version 4 3/5] SUNRPC new rpc_credops to test credential expiry andros
2013-08-07 19:05   ` Myklebust, Trond
2013-07-18 19:35 ` [PATCH Version 4 4/5] NFS avoid expired credential keys for buffered writes andros
2013-08-07 18:55   ` Myklebust, Trond
2013-07-18 19:35 ` [PATCH Version 4 5/5] SUNRPC refactor rpcauth_checkverf error returns andros
2013-08-07 19:07   ` Myklebust, Trond

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=1374176130-11657-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.