diff options
author | Andy Adamson <andros@netapp.com> | 2009-04-01 09:22:35 -0400 |
---|---|---|
committer | Benny Halevy <bhalevy@panasas.com> | 2009-06-17 15:25:04 -0400 |
commit | 8328d59f380e26477b9c1ede99e33d021365bcd1 (patch) | |
tree | 5e3ed18de4bfa37686f776def03d7d619661cd01 /fs/nfs/nfs4proc.c | |
parent | 0f3e66c6a6cae479028d31198288e524fe5ff90d (diff) |
nfs41: enable nfs_client only nfs4_async_handle_error
The session is per struct nfs_client, not per nfs_server. Allow the handler
to be called with no nfs_server which simplifies the nfs4_proc_async_sequence session renewal call and will let it be used by pnfs file layout data servers.
Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r-- | fs/nfs/nfs4proc.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 59e8bf5b10bb..5fe208b486d4 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -3221,10 +3221,8 @@ static int nfs4_proc_set_acl(struct inode *inode, const void *buf, size_t buflen | |||
3221 | } | 3221 | } |
3222 | 3222 | ||
3223 | static int | 3223 | static int |
3224 | nfs4_async_handle_error(struct rpc_task *task, const struct nfs_server *server, struct nfs4_state *state) | 3224 | _nfs4_async_handle_error(struct rpc_task *task, const struct nfs_server *server, struct nfs_client *clp, struct nfs4_state *state) |
3225 | { | 3225 | { |
3226 | struct nfs_client *clp = server->nfs_client; | ||
3227 | |||
3228 | if (!clp || task->tk_status >= 0) | 3226 | if (!clp || task->tk_status >= 0) |
3229 | return 0; | 3227 | return 0; |
3230 | switch(task->tk_status) { | 3228 | switch(task->tk_status) { |
@@ -3244,7 +3242,8 @@ nfs4_async_handle_error(struct rpc_task *task, const struct nfs_server *server, | |||
3244 | task->tk_status = 0; | 3242 | task->tk_status = 0; |
3245 | return -EAGAIN; | 3243 | return -EAGAIN; |
3246 | case -NFS4ERR_DELAY: | 3244 | case -NFS4ERR_DELAY: |
3247 | nfs_inc_server_stats(server, NFSIOS_DELAY); | 3245 | if (server) |
3246 | nfs_inc_server_stats(server, NFSIOS_DELAY); | ||
3248 | case -NFS4ERR_GRACE: | 3247 | case -NFS4ERR_GRACE: |
3249 | rpc_delay(task, NFS4_POLL_RETRY_MAX); | 3248 | rpc_delay(task, NFS4_POLL_RETRY_MAX); |
3250 | task->tk_status = 0; | 3249 | task->tk_status = 0; |
@@ -3257,6 +3256,12 @@ nfs4_async_handle_error(struct rpc_task *task, const struct nfs_server *server, | |||
3257 | return 0; | 3256 | return 0; |
3258 | } | 3257 | } |
3259 | 3258 | ||
3259 | static int | ||
3260 | nfs4_async_handle_error(struct rpc_task *task, const struct nfs_server *server, struct nfs4_state *state) | ||
3261 | { | ||
3262 | return _nfs4_async_handle_error(task, server, server->nfs_client, state); | ||
3263 | } | ||
3264 | |||
3260 | int nfs4_proc_setclientid(struct nfs_client *clp, u32 program, unsigned short port, struct rpc_cred *cred) | 3265 | int nfs4_proc_setclientid(struct nfs_client *clp, u32 program, unsigned short port, struct rpc_cred *cred) |
3261 | { | 3266 | { |
3262 | nfs4_verifier sc_verifier; | 3267 | nfs4_verifier sc_verifier; |