diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2009-12-07 09:00:24 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2009-12-07 09:00:24 -0500 |
commit | 0110ee152b69f8cbde19d8bc1dd59e197e419d76 (patch) | |
tree | f7a70abaaa97f03e358b2fb07103f5af4e98d5a5 /fs/nfs/internal.h | |
parent | 9dfdf404c99347e2e224e25f8626e7b6399a05cd (diff) | |
download | linux-3.10-0110ee152b69f8cbde19d8bc1dd59e197e419d76.tar.gz linux-3.10-0110ee152b69f8cbde19d8bc1dd59e197e419d76.tar.bz2 linux-3.10-0110ee152b69f8cbde19d8bc1dd59e197e419d76.zip |
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.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h index b1a020c1172..29e464d23b3 100644 --- a/fs/nfs/internal.h +++ b/fs/nfs/internal.h @@ -197,7 +197,6 @@ extern const u32 nfs41_maxwrite_overhead; #endif /* nfs4proc.c */ -extern void nfs4_restart_rpc(struct rpc_task *, const struct nfs_client *); #ifdef CONFIG_NFS_V4 extern struct rpc_procinfo nfs4_procedures[]; #endif @@ -367,3 +366,15 @@ unsigned int nfs_page_array_len(unsigned int base, size_t len) return ((unsigned long)len + (unsigned long)base + PAGE_SIZE - 1) >> PAGE_SHIFT; } + +/* + * Helper for restarting RPC calls in the possible presence of NFSv4.1 + * sessions. + */ +static inline void nfs_restart_rpc(struct rpc_task *task, const struct nfs_client *clp) +{ + if (nfs4_has_session(clp)) + rpc_restart_call_prepare(task); + else + rpc_restart_call(task); +} |