summaryrefslogtreecommitdiffstats
path: root/fs/ecryptfs/dentry.c
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2006-12-12 17:41:41 -0500
committerDave Jones <davej@redhat.com>2006-12-12 17:41:41 -0500
commitc4366889dda8110247be59ca41fddb82951a8c26 (patch)
tree705c1a996bed8fd48ce94ff33ec9fd00f9b94875 /fs/ecryptfs/dentry.c
parentdb2fb9db5735cc532fd4fc55e94b9a3c3750378e (diff)
parente1036502e5263851259d147771226161e5ccc85a (diff)
Merge ../linus
Conflicts: drivers/cpufreq/cpufreq.c
Diffstat (limited to 'fs/ecryptfs/dentry.c')
-rw-r--r--fs/ecryptfs/dentry.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/fs/ecryptfs/dentry.c b/fs/ecryptfs/dentry.c
index f0d2a433242..329efcd3d8c 100644
--- a/fs/ecryptfs/dentry.c
+++ b/fs/ecryptfs/dentry.c
@@ -24,6 +24,8 @@
#include <linux/dcache.h>
#include <linux/namei.h>
+#include <linux/mount.h>
+#include <linux/fs_stack.h>
#include "ecryptfs_kernel.h"
/**
@@ -56,6 +58,12 @@ static int ecryptfs_d_revalidate(struct dentry *dentry, struct nameidata *nd)
rc = lower_dentry->d_op->d_revalidate(lower_dentry, nd);
nd->dentry = dentry_save;
nd->mnt = vfsmount_save;
+ if (dentry->d_inode) {
+ struct inode *lower_inode =
+ ecryptfs_inode_to_lower(dentry->d_inode);
+
+ fsstack_copy_attr_all(dentry->d_inode, lower_inode, NULL);
+ }
out:
return rc;
}
@@ -76,8 +84,13 @@ static void ecryptfs_d_release(struct dentry *dentry)
if (ecryptfs_dentry_to_private(dentry))
kmem_cache_free(ecryptfs_dentry_info_cache,
ecryptfs_dentry_to_private(dentry));
- if (lower_dentry)
+ if (lower_dentry) {
+ struct vfsmount *lower_mnt =
+ ecryptfs_dentry_to_lower_mnt(dentry);
+
+ mntput(lower_mnt);
dput(lower_dentry);
+ }
return;
}