[PATCH 1/4] ecryptfs: add ecryptfs_superblock_to_lower_mnt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We need the help of lower vfsmount to decode filehandle.
This patch add a method to get lower vfsmount.

Signed-off-by: Chieh Lin <jaycelin@xxxxxxxxxxxx>
---
 fs/ecryptfs/ecryptfs_kernel.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/fs/ecryptfs/ecryptfs_kernel.h b/fs/ecryptfs/ecryptfs_kernel.h
index e74cb2a0b299..cd6359b5faf1 100644
--- a/fs/ecryptfs/ecryptfs_kernel.h
+++ b/fs/ecryptfs/ecryptfs_kernel.h
@@ -535,6 +535,12 @@ ecryptfs_dentry_to_lower_mnt(struct dentry *dentry)
 	return ((struct ecryptfs_dentry_info *)dentry->d_fsdata)->lower_path.mnt;
 }
 
+static inline struct vfsmount *
+ecryptfs_superblock_to_lower_mnt(struct super_block *sb)
+{
+	return ecryptfs_dentry_to_lower_mnt(sb->s_root);
+}
+
 static inline struct path *
 ecryptfs_dentry_to_lower_path(struct dentry *dentry)
 {
-- 
2.17.1




[Index of Archives]     [Linux Crypto]     [Device Mapper Crypto]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux