diff options
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r-- | fs/nfs/nfs4proc.c | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index fbae2c94dbc6..acde77654521 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -625,17 +625,6 @@ static void nfs4_sequence_done(const struct nfs_server *server, | |||
625 | #endif /* CONFIG_NFS_V4_1 */ | 625 | #endif /* CONFIG_NFS_V4_1 */ |
626 | } | 626 | } |
627 | 627 | ||
628 | void nfs4_restart_rpc(struct rpc_task *task, const struct nfs_client *clp) | ||
629 | { | ||
630 | #ifdef CONFIG_NFS_V4_1 | ||
631 | if (nfs4_has_session(clp)) { | ||
632 | rpc_restart_call_prepare(task); | ||
633 | return; | ||
634 | } | ||
635 | #endif /* CONFIG_NFS_V4_1 */ | ||
636 | rpc_restart_call(task); | ||
637 | } | ||
638 | |||
639 | static void update_changeattr(struct inode *dir, struct nfs4_change_info *cinfo) | 628 | static void update_changeattr(struct inode *dir, struct nfs4_change_info *cinfo) |
640 | { | 629 | { |
641 | struct nfs_inode *nfsi = NFS_I(dir); | 630 | struct nfs_inode *nfsi = NFS_I(dir); |
@@ -1739,7 +1728,7 @@ static void nfs4_close_done(struct rpc_task *task, void *data) | |||
1739 | break; | 1728 | break; |
1740 | default: | 1729 | default: |
1741 | if (nfs4_async_handle_error(task, server, state) == -EAGAIN) { | 1730 | if (nfs4_async_handle_error(task, server, state) == -EAGAIN) { |
1742 | nfs4_restart_rpc(task, server->nfs_client); | 1731 | nfs_restart_rpc(task, server->nfs_client); |
1743 | return; | 1732 | return; |
1744 | } | 1733 | } |
1745 | } | 1734 | } |
@@ -2974,7 +2963,7 @@ static int nfs4_read_done(struct rpc_task *task, struct nfs_read_data *data) | |||
2974 | nfs4_sequence_done(server, &data->res.seq_res, task->tk_status); | 2963 | nfs4_sequence_done(server, &data->res.seq_res, task->tk_status); |
2975 | 2964 | ||
2976 | if (nfs4_async_handle_error(task, server, data->args.context->state) == -EAGAIN) { | 2965 | if (nfs4_async_handle_error(task, server, data->args.context->state) == -EAGAIN) { |
2977 | nfs4_restart_rpc(task, server->nfs_client); | 2966 | nfs_restart_rpc(task, server->nfs_client); |
2978 | return -EAGAIN; | 2967 | return -EAGAIN; |
2979 | } | 2968 | } |
2980 | 2969 | ||
@@ -2998,7 +2987,7 @@ static int nfs4_write_done(struct rpc_task *task, struct nfs_write_data *data) | |||
2998 | task->tk_status); | 2987 | task->tk_status); |
2999 | 2988 | ||
3000 | if (nfs4_async_handle_error(task, NFS_SERVER(inode), data->args.context->state) == -EAGAIN) { | 2989 | if (nfs4_async_handle_error(task, NFS_SERVER(inode), data->args.context->state) == -EAGAIN) { |
3001 | nfs4_restart_rpc(task, NFS_SERVER(inode)->nfs_client); | 2990 | nfs_restart_rpc(task, NFS_SERVER(inode)->nfs_client); |
3002 | return -EAGAIN; | 2991 | return -EAGAIN; |
3003 | } | 2992 | } |
3004 | if (task->tk_status >= 0) { | 2993 | if (task->tk_status >= 0) { |
@@ -3026,7 +3015,7 @@ static int nfs4_commit_done(struct rpc_task *task, struct nfs_write_data *data) | |||
3026 | nfs4_sequence_done(NFS_SERVER(inode), &data->res.seq_res, | 3015 | nfs4_sequence_done(NFS_SERVER(inode), &data->res.seq_res, |
3027 | task->tk_status); | 3016 | task->tk_status); |
3028 | if (nfs4_async_handle_error(task, NFS_SERVER(inode), NULL) == -EAGAIN) { | 3017 | if (nfs4_async_handle_error(task, NFS_SERVER(inode), NULL) == -EAGAIN) { |
3029 | nfs4_restart_rpc(task, NFS_SERVER(inode)->nfs_client); | 3018 | nfs_restart_rpc(task, NFS_SERVER(inode)->nfs_client); |
3030 | return -EAGAIN; | 3019 | return -EAGAIN; |
3031 | } | 3020 | } |
3032 | nfs_refresh_inode(inode, data->res.fattr); | 3021 | nfs_refresh_inode(inode, data->res.fattr); |
@@ -3737,7 +3726,7 @@ static void nfs4_locku_done(struct rpc_task *task, void *data) | |||
3737 | break; | 3726 | break; |
3738 | default: | 3727 | default: |
3739 | if (nfs4_async_handle_error(task, calldata->server, NULL) == -EAGAIN) | 3728 | if (nfs4_async_handle_error(task, calldata->server, NULL) == -EAGAIN) |
3740 | nfs4_restart_rpc(task, | 3729 | nfs_restart_rpc(task, |
3741 | calldata->server->nfs_client); | 3730 | calldata->server->nfs_client); |
3742 | } | 3731 | } |
3743 | } | 3732 | } |
@@ -4392,7 +4381,7 @@ static void nfs4_get_lease_time_done(struct rpc_task *task, void *calldata) | |||
4392 | dprintk("%s Retry: tk_status %d\n", __func__, task->tk_status); | 4381 | dprintk("%s Retry: tk_status %d\n", __func__, task->tk_status); |
4393 | rpc_delay(task, NFS4_POLL_RETRY_MIN); | 4382 | rpc_delay(task, NFS4_POLL_RETRY_MIN); |
4394 | task->tk_status = 0; | 4383 | task->tk_status = 0; |
4395 | nfs4_restart_rpc(task, data->clp); | 4384 | nfs_restart_rpc(task, data->clp); |
4396 | return; | 4385 | return; |
4397 | } | 4386 | } |
4398 | dprintk("<-- %s\n", __func__); | 4387 | dprintk("<-- %s\n", __func__); |
@@ -4854,7 +4843,7 @@ void nfs41_sequence_call_done(struct rpc_task *task, void *data) | |||
4854 | 4843 | ||
4855 | if (_nfs4_async_handle_error(task, NULL, clp, NULL) | 4844 | if (_nfs4_async_handle_error(task, NULL, clp, NULL) |
4856 | == -EAGAIN) { | 4845 | == -EAGAIN) { |
4857 | nfs4_restart_rpc(task, clp); | 4846 | nfs_restart_rpc(task, clp); |
4858 | return; | 4847 | return; |
4859 | } | 4848 | } |
4860 | } | 4849 | } |