aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2009-12-07 09:00:24 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2009-12-07 09:00:24 -0500
commit0110ee152b69f8cbde19d8bc1dd59e197e419d76 (patch)
treef7a70abaaa97f03e358b2fb07103f5af4e98d5a5 /fs
parent9dfdf404c99347e2e224e25f8626e7b6399a05cd (diff)
NFS: Fix up the declaration of nfs4_restart_rpc when NFSv4 not configured
Also rename it: it is used in generic code, and so should not have a 'nfs4' prefix. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/internal.h13
-rw-r--r--fs/nfs/nfs4proc.c25
-rw-r--r--fs/nfs/read.c2
-rw-r--r--fs/nfs/unlink.c2
-rw-r--r--fs/nfs/write.c2
5 files changed, 22 insertions, 22 deletions
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
index b1a020c11724..29e464d23b32 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -197,7 +197,6 @@ extern const u32 nfs41_maxwrite_overhead;
197#endif 197#endif
198 198
199/* nfs4proc.c */ 199/* nfs4proc.c */
200extern void nfs4_restart_rpc(struct rpc_task *, const struct nfs_client *);
201#ifdef CONFIG_NFS_V4 200#ifdef CONFIG_NFS_V4
202extern struct rpc_procinfo nfs4_procedures[]; 201extern struct rpc_procinfo nfs4_procedures[];
203#endif 202#endif
@@ -367,3 +366,15 @@ unsigned int nfs_page_array_len(unsigned int base, size_t len)
367 return ((unsigned long)len + (unsigned long)base + 366 return ((unsigned long)len + (unsigned long)base +
368 PAGE_SIZE - 1) >> PAGE_SHIFT; 367 PAGE_SIZE - 1) >> PAGE_SHIFT;
369} 368}
369
370/*
371 * Helper for restarting RPC calls in the possible presence of NFSv4.1
372 * sessions.
373 */
374static inline void nfs_restart_rpc(struct rpc_task *task, const struct nfs_client *clp)
375{
376 if (nfs4_has_session(clp))
377 rpc_restart_call_prepare(task);
378 else
379 rpc_restart_call(task);
380}
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
628void 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
639static void update_changeattr(struct inode *dir, struct nfs4_change_info *cinfo) 628static 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 }
diff --git a/fs/nfs/read.c b/fs/nfs/read.c
index d319bfbe5137..db9b360ae19d 100644
--- a/fs/nfs/read.c
+++ b/fs/nfs/read.c
@@ -368,7 +368,7 @@ static void nfs_readpage_retry(struct rpc_task *task, struct nfs_read_data *data
368 argp->offset += resp->count; 368 argp->offset += resp->count;
369 argp->pgbase += resp->count; 369 argp->pgbase += resp->count;
370 argp->count -= resp->count; 370 argp->count -= resp->count;
371 nfs4_restart_rpc(task, NFS_SERVER(data->inode)->nfs_client); 371 nfs_restart_rpc(task, NFS_SERVER(data->inode)->nfs_client);
372} 372}
373 373
374/* 374/*
diff --git a/fs/nfs/unlink.c b/fs/nfs/unlink.c
index 1064c91ae810..6da3d3ff6edd 100644
--- a/fs/nfs/unlink.c
+++ b/fs/nfs/unlink.c
@@ -83,7 +83,7 @@ static void nfs_async_unlink_done(struct rpc_task *task, void *calldata)
83 struct inode *dir = data->dir; 83 struct inode *dir = data->dir;
84 84
85 if (!NFS_PROTO(dir)->unlink_done(task, dir)) 85 if (!NFS_PROTO(dir)->unlink_done(task, dir))
86 nfs4_restart_rpc(task, NFS_SERVER(dir)->nfs_client); 86 nfs_restart_rpc(task, NFS_SERVER(dir)->nfs_client);
87} 87}
88 88
89/** 89/**
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index d546c607de08..a28123be08a6 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -1216,7 +1216,7 @@ int nfs_writeback_done(struct rpc_task *task, struct nfs_write_data *data)
1216 */ 1216 */
1217 argp->stable = NFS_FILE_SYNC; 1217 argp->stable = NFS_FILE_SYNC;
1218 } 1218 }
1219 nfs4_restart_rpc(task, server->nfs_client); 1219 nfs_restart_rpc(task, server->nfs_client);
1220 return -EAGAIN; 1220 return -EAGAIN;
1221 } 1221 }
1222 if (time_before(complain, jiffies)) { 1222 if (time_before(complain, jiffies)) {