aboutsummaryrefslogtreecommitdiff
path: root/fs/nfs/internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/internal.h')
-rw-r--r--fs/nfs/internal.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
index ffa6bd54d43..7cef45db925 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -207,6 +207,18 @@ extern int nfs4_path_walk(struct nfs_server *server,
#endif
/*
+ * Determine if sessions are in use.
+ */
+static inline int nfs4_has_session(const struct nfs_client *clp)
+{
+#ifdef CONFIG_NFS_V4_1
+ if (clp->cl_session)
+ return 1;
+#endif /* CONFIG_NFS_V4_1 */
+ return 0;
+}
+
+/*
* Determine the device name as a string
*/
static inline char *nfs_devname(const struct vfsmount *mnt_parent,