aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ecryptfs/ecryptfs_kernel.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ecryptfs/ecryptfs_kernel.h')
-rw-r--r--fs/ecryptfs/ecryptfs_kernel.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/fs/ecryptfs/ecryptfs_kernel.h b/fs/ecryptfs/ecryptfs_kernel.h
index f992533d1692..afb64bdbe6ad 100644
--- a/fs/ecryptfs/ecryptfs_kernel.h
+++ b/fs/ecryptfs/ecryptfs_kernel.h
@@ -28,6 +28,8 @@
28 28
29#include <keys/user-type.h> 29#include <keys/user-type.h>
30#include <linux/fs.h> 30#include <linux/fs.h>
31#include <linux/fs_stack.h>
32#include <linux/namei.h>
31#include <linux/scatterlist.h> 33#include <linux/scatterlist.h>
32 34
33/* Version verification for shared data structures w/ userspace */ 35/* Version verification for shared data structures w/ userspace */
@@ -227,8 +229,7 @@ struct ecryptfs_inode_info {
227/* dentry private data. Each dentry must keep track of a lower 229/* dentry private data. Each dentry must keep track of a lower
228 * vfsmount too. */ 230 * vfsmount too. */
229struct ecryptfs_dentry_info { 231struct ecryptfs_dentry_info {
230 struct dentry *wdi_dentry; 232 struct path lower_path;
231 struct vfsmount *lower_mnt;
232 struct ecryptfs_crypt_stat *crypt_stat; 233 struct ecryptfs_crypt_stat *crypt_stat;
233}; 234};
234 235
@@ -355,26 +356,26 @@ ecryptfs_set_dentry_private(struct dentry *dentry,
355static inline struct dentry * 356static inline struct dentry *
356ecryptfs_dentry_to_lower(struct dentry *dentry) 357ecryptfs_dentry_to_lower(struct dentry *dentry)
357{ 358{
358 return ((struct ecryptfs_dentry_info *)dentry->d_fsdata)->wdi_dentry; 359 return ((struct ecryptfs_dentry_info *)dentry->d_fsdata)->lower_path.dentry;
359} 360}
360 361
361static inline void 362static inline void
362ecryptfs_set_dentry_lower(struct dentry *dentry, struct dentry *lower_dentry) 363ecryptfs_set_dentry_lower(struct dentry *dentry, struct dentry *lower_dentry)
363{ 364{
364 ((struct ecryptfs_dentry_info *)dentry->d_fsdata)->wdi_dentry = 365 ((struct ecryptfs_dentry_info *)dentry->d_fsdata)->lower_path.dentry =
365 lower_dentry; 366 lower_dentry;
366} 367}
367 368
368static inline struct vfsmount * 369static inline struct vfsmount *
369ecryptfs_dentry_to_lower_mnt(struct dentry *dentry) 370ecryptfs_dentry_to_lower_mnt(struct dentry *dentry)
370{ 371{
371 return ((struct ecryptfs_dentry_info *)dentry->d_fsdata)->lower_mnt; 372 return ((struct ecryptfs_dentry_info *)dentry->d_fsdata)->lower_path.mnt;
372} 373}
373 374
374static inline void 375static inline void
375ecryptfs_set_dentry_lower_mnt(struct dentry *dentry, struct vfsmount *lower_mnt) 376ecryptfs_set_dentry_lower_mnt(struct dentry *dentry, struct vfsmount *lower_mnt)
376{ 377{
377 ((struct ecryptfs_dentry_info *)dentry->d_fsdata)->lower_mnt = 378 ((struct ecryptfs_dentry_info *)dentry->d_fsdata)->lower_path.mnt =
378 lower_mnt; 379 lower_mnt;
379} 380}
380 381
@@ -413,9 +414,6 @@ int ecryptfs_encode_filename(struct ecryptfs_crypt_stat *crypt_stat,
413 const char *name, int length, 414 const char *name, int length,
414 char **encoded_name); 415 char **encoded_name);
415struct dentry *ecryptfs_lower_dentry(struct dentry *this_dentry); 416struct dentry *ecryptfs_lower_dentry(struct dentry *this_dentry);
416void ecryptfs_copy_attr_atime(struct inode *dest, const struct inode *src);
417void ecryptfs_copy_attr_all(struct inode *dest, const struct inode *src);
418void ecryptfs_copy_inode_size(struct inode *dst, const struct inode *src);
419void ecryptfs_dump_hex(char *data, int bytes); 417void ecryptfs_dump_hex(char *data, int bytes);
420int virt_to_scatterlist(const void *addr, int size, struct scatterlist *sg, 418int virt_to_scatterlist(const void *addr, int size, struct scatterlist *sg,
421 int sg_size); 419 int sg_size);