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>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user