diff options
author | Jeff Layton <jlayton@redhat.com> | 2010-01-07 09:42:04 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-02-10 08:30:51 -0500 |
commit | b68d69b8c6d19f4c2174f26fe8b750a0e82eb732 (patch) | |
tree | 3a01c24d0050ee20efbc493c6b533a51d2ba4276 /fs/nfs | |
parent | 2c6434888cef9e5f450d6c5b7df6d8c625ed27c1 (diff) |
nfs: handle NFSv3 -EKEYEXPIRED errors as we would -EJUKEBOX
We're using -EKEYEXPIRED to indicate that a krb5 credcache contains an
expired ticket and that we should have the NFS layer retry the RPC call
instead of returning an error back to the caller. Handle this as we
would an -EJUKEBOX error return.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/nfs3proc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c index 3f8881d1a050..24992f0a29f2 100644 --- a/fs/nfs/nfs3proc.c +++ b/fs/nfs/nfs3proc.c | |||
@@ -22,14 +22,14 @@ | |||
22 | 22 | ||
23 | #define NFSDBG_FACILITY NFSDBG_PROC | 23 | #define NFSDBG_FACILITY NFSDBG_PROC |
24 | 24 | ||
25 | /* A wrapper to handle the EJUKEBOX error message */ | 25 | /* A wrapper to handle the EJUKEBOX and EKEYEXPIRED error messages */ |
26 | static int | 26 | static int |
27 | nfs3_rpc_wrapper(struct rpc_clnt *clnt, struct rpc_message *msg, int flags) | 27 | nfs3_rpc_wrapper(struct rpc_clnt *clnt, struct rpc_message *msg, int flags) |
28 | { | 28 | { |
29 | int res; | 29 | int res; |
30 | do { | 30 | do { |
31 | res = rpc_call_sync(clnt, msg, flags); | 31 | res = rpc_call_sync(clnt, msg, flags); |
32 | if (res != -EJUKEBOX) | 32 | if (res != -EJUKEBOX && res != -EKEYEXPIRED) |
33 | break; | 33 | break; |
34 | schedule_timeout_killable(NFS_JUKEBOX_RETRY_TIME); | 34 | schedule_timeout_killable(NFS_JUKEBOX_RETRY_TIME); |
35 | res = -ERESTARTSYS; | 35 | res = -ERESTARTSYS; |
@@ -42,9 +42,10 @@ nfs3_rpc_wrapper(struct rpc_clnt *clnt, struct rpc_message *msg, int flags) | |||
42 | static int | 42 | static int |
43 | nfs3_async_handle_jukebox(struct rpc_task *task, struct inode *inode) | 43 | nfs3_async_handle_jukebox(struct rpc_task *task, struct inode *inode) |
44 | { | 44 | { |
45 | if (task->tk_status != -EJUKEBOX) | 45 | if (task->tk_status != -EJUKEBOX && task->tk_status != -EKEYEXPIRED) |
46 | return 0; | 46 | return 0; |
47 | nfs_inc_stats(inode, NFSIOS_DELAY); | 47 | if (task->tk_status == -EJUKEBOX) |
48 | nfs_inc_stats(inode, NFSIOS_DELAY); | ||
48 | task->tk_status = 0; | 49 | task->tk_status = 0; |
49 | rpc_restart_call(task); | 50 | rpc_restart_call(task); |
50 | rpc_delay(task, NFS_JUKEBOX_RETRY_TIME); | 51 | rpc_delay(task, NFS_JUKEBOX_RETRY_TIME); |