diff options
author | David Woodhouse <dwmw2@infradead.org> | 2006-12-01 04:56:43 -0500 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-12-01 04:56:43 -0500 |
commit | bd3c97a7c718bfb9f1e4f31c16c383a5c6f815eb (patch) | |
tree | 3f56594e813c6f35cbacbdb3e137ba5bfd0b3069 /fs/ecryptfs/dentry.c | |
parent | 6c33cafc794d07c9254c160789120a0e98c088c9 (diff) | |
parent | 0215ffb08ce99e2bb59eca114a99499a4d06e704 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'fs/ecryptfs/dentry.c')
-rw-r--r-- | fs/ecryptfs/dentry.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/fs/ecryptfs/dentry.c b/fs/ecryptfs/dentry.c index f0d2a433242b..52d1e36dc746 100644 --- a/fs/ecryptfs/dentry.c +++ b/fs/ecryptfs/dentry.c | |||
@@ -24,6 +24,7 @@ | |||
24 | 24 | ||
25 | #include <linux/dcache.h> | 25 | #include <linux/dcache.h> |
26 | #include <linux/namei.h> | 26 | #include <linux/namei.h> |
27 | #include <linux/mount.h> | ||
27 | #include "ecryptfs_kernel.h" | 28 | #include "ecryptfs_kernel.h" |
28 | 29 | ||
29 | /** | 30 | /** |
@@ -56,6 +57,12 @@ static int ecryptfs_d_revalidate(struct dentry *dentry, struct nameidata *nd) | |||
56 | rc = lower_dentry->d_op->d_revalidate(lower_dentry, nd); | 57 | rc = lower_dentry->d_op->d_revalidate(lower_dentry, nd); |
57 | nd->dentry = dentry_save; | 58 | nd->dentry = dentry_save; |
58 | nd->mnt = vfsmount_save; | 59 | nd->mnt = vfsmount_save; |
60 | if (dentry->d_inode) { | ||
61 | struct inode *lower_inode = | ||
62 | ecryptfs_inode_to_lower(dentry->d_inode); | ||
63 | |||
64 | ecryptfs_copy_attr_all(dentry->d_inode, lower_inode); | ||
65 | } | ||
59 | out: | 66 | out: |
60 | return rc; | 67 | return rc; |
61 | } | 68 | } |
@@ -76,8 +83,13 @@ static void ecryptfs_d_release(struct dentry *dentry) | |||
76 | if (ecryptfs_dentry_to_private(dentry)) | 83 | if (ecryptfs_dentry_to_private(dentry)) |
77 | kmem_cache_free(ecryptfs_dentry_info_cache, | 84 | kmem_cache_free(ecryptfs_dentry_info_cache, |
78 | ecryptfs_dentry_to_private(dentry)); | 85 | ecryptfs_dentry_to_private(dentry)); |
79 | if (lower_dentry) | 86 | if (lower_dentry) { |
87 | struct vfsmount *lower_mnt = | ||
88 | ecryptfs_dentry_to_lower_mnt(dentry); | ||
89 | |||
90 | mntput(lower_mnt); | ||
80 | dput(lower_dentry); | 91 | dput(lower_dentry); |
92 | } | ||
81 | return; | 93 | return; |
82 | } | 94 | } |
83 | 95 | ||