summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorAlexandros Batsakis <batsakis@netapp.com>2009-12-05 13:29:53 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2009-12-05 13:29:53 -0500
commitd8cb1a7ce36d44602946f06af4267da304fb4011 (patch)
tree695622613261f5beba38829db8d8f17d55461ff5 /fs/nfs
parent31f0960778c78198957cf02cc970d92b72b929e4 (diff)
downloadop-kernel-dev-d8cb1a7ce36d44602946f06af4267da304fb4011.zip
op-kernel-dev-d8cb1a7ce36d44602946f06af4267da304fb4011.tar.gz
nfs41: check if session exists and if it is persistent
Signed-off-by: Alexandros Batsakis <batsakis@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/internal.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
index 7b890ba..7466d24 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -30,6 +30,15 @@ static inline int nfs4_has_session(const struct nfs_client *clp)
return 0;
}
+static inline int nfs4_has_persistent_session(const struct nfs_client *clp)
+{
+#ifdef CONFIG_NFS_V4_1
+ if (nfs4_has_session(clp))
+ return (clp->cl_session->flags & SESSION4_PERSIST);
+#endif /* CONFIG_NFS_V4_1 */
+ return 0;
+}
+
struct nfs_clone_mount {
const struct super_block *sb;
const struct dentry *dentry;
OpenPOWER on IntegriCloud