From: Alexandros Batsakis Date: Sat, 5 Dec 2009 18:29:53 +0000 (-0500) Subject: nfs41: check if session exists and if it is persistent X-Git-Tag: v2.6.33-rc1~287^2^2~26 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d8cb1a7ce36d44602946f06af4267da304fb4011;p=karo-tx-linux.git nfs41: check if session exists and if it is persistent Signed-off-by: Alexandros Batsakis Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h index 7b890ba37fa2..7466d24893f7 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;