aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/internal.h
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/nfs/internal.h
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/nfs/internal.h')
-rw-r--r--fs/nfs/internal.h13
1 files changed, 12 insertions, 1 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}