]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
nfs41: check if session exists and if it is persistent
authorAlexandros Batsakis <batsakis@netapp.com>
Sat, 5 Dec 2009 18:29:53 +0000 (13:29 -0500)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Sat, 5 Dec 2009 18:29:53 +0000 (13:29 -0500)
Signed-off-by: Alexandros Batsakis <batsakis@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/internal.h

index 7b890ba37fa2ff8833e0bf097a6fa0ae5f15694f..7466d24893f7c5fd4723575fada2700acac84f19 100644 (file)
@@ -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;