mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 20:54:10 +08:00
[PATCH] struct path: make eCryptfs a user of struct path
Convert eCryptfs dentry-vfsmount pairs in dentry private data to struct path. Signed-off-by: Josef "Jeff" Sipek <jsipek@cs.sunysb.edu> Cc: Michael Halcrow <mhalcrow@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
346f20ff60
commit
b65d34fd46
@ -29,6 +29,7 @@
|
|||||||
#include <keys/user-type.h>
|
#include <keys/user-type.h>
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
#include <linux/fs_stack.h>
|
#include <linux/fs_stack.h>
|
||||||
|
#include <linux/namei.h>
|
||||||
#include <linux/scatterlist.h>
|
#include <linux/scatterlist.h>
|
||||||
|
|
||||||
/* Version verification for shared data structures w/ userspace */
|
/* Version verification for shared data structures w/ userspace */
|
||||||
@ -228,8 +229,7 @@ struct ecryptfs_inode_info {
|
|||||||
/* dentry private data. Each dentry must keep track of a lower
|
/* dentry private data. Each dentry must keep track of a lower
|
||||||
* vfsmount too. */
|
* vfsmount too. */
|
||||||
struct ecryptfs_dentry_info {
|
struct ecryptfs_dentry_info {
|
||||||
struct dentry *wdi_dentry;
|
struct path lower_path;
|
||||||
struct vfsmount *lower_mnt;
|
|
||||||
struct ecryptfs_crypt_stat *crypt_stat;
|
struct ecryptfs_crypt_stat *crypt_stat;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -356,26 +356,26 @@ ecryptfs_set_dentry_private(struct dentry *dentry,
|
|||||||
static inline struct dentry *
|
static inline struct dentry *
|
||||||
ecryptfs_dentry_to_lower(struct dentry *dentry)
|
ecryptfs_dentry_to_lower(struct dentry *dentry)
|
||||||
{
|
{
|
||||||
return ((struct ecryptfs_dentry_info *)dentry->d_fsdata)->wdi_dentry;
|
return ((struct ecryptfs_dentry_info *)dentry->d_fsdata)->lower_path.dentry;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
ecryptfs_set_dentry_lower(struct dentry *dentry, struct dentry *lower_dentry)
|
ecryptfs_set_dentry_lower(struct dentry *dentry, struct dentry *lower_dentry)
|
||||||
{
|
{
|
||||||
((struct ecryptfs_dentry_info *)dentry->d_fsdata)->wdi_dentry =
|
((struct ecryptfs_dentry_info *)dentry->d_fsdata)->lower_path.dentry =
|
||||||
lower_dentry;
|
lower_dentry;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline struct vfsmount *
|
static inline struct vfsmount *
|
||||||
ecryptfs_dentry_to_lower_mnt(struct dentry *dentry)
|
ecryptfs_dentry_to_lower_mnt(struct dentry *dentry)
|
||||||
{
|
{
|
||||||
return ((struct ecryptfs_dentry_info *)dentry->d_fsdata)->lower_mnt;
|
return ((struct ecryptfs_dentry_info *)dentry->d_fsdata)->lower_path.mnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
ecryptfs_set_dentry_lower_mnt(struct dentry *dentry, struct vfsmount *lower_mnt)
|
ecryptfs_set_dentry_lower_mnt(struct dentry *dentry, struct vfsmount *lower_mnt)
|
||||||
{
|
{
|
||||||
((struct ecryptfs_dentry_info *)dentry->d_fsdata)->lower_mnt =
|
((struct ecryptfs_dentry_info *)dentry->d_fsdata)->lower_path.mnt =
|
||||||
lower_mnt;
|
lower_mnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user