From 78115a4ddb6c0579e2cd184dccaee1ea436161e2 Mon Sep 17 00:00:00 2001 From: Michael Halcrow Date: Thu, 16 Nov 2006 01:19:30 -0800 Subject: [PATCH] --- yaml --- r: 40951 b: refs/heads/master c: ae56fb16337c882c52806508f93ead4034004c7a h: refs/heads/master i: 40949: 04dc70b6c492f1139e521a24e8595a28841ffda0 40947: 600cd3ae6f1cc183b7284154a66d356f1aafb5e8 40943: 6c0fd6951fcff90eb18be0c3b432d8af56490905 v: v3 --- [refs] | 2 +- trunk/fs/ecryptfs/dentry.c | 6 ++++++ trunk/fs/ecryptfs/inode.c | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 7d70c7a67acc..f1ff304d0f16 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 31be8309532a6743f301cb2e83bd12ca07988b09 +refs/heads/master: ae56fb16337c882c52806508f93ead4034004c7a diff --git a/trunk/fs/ecryptfs/dentry.c b/trunk/fs/ecryptfs/dentry.c index 0b9992ab990f..52d1e36dc746 100644 --- a/trunk/fs/ecryptfs/dentry.c +++ b/trunk/fs/ecryptfs/dentry.c @@ -57,6 +57,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); + + ecryptfs_copy_attr_all(dentry->d_inode, lower_inode); + } out: return rc; } diff --git a/trunk/fs/ecryptfs/inode.c b/trunk/fs/ecryptfs/inode.c index ebec8cfc189b..dfcc68484f47 100644 --- a/trunk/fs/ecryptfs/inode.c +++ b/trunk/fs/ecryptfs/inode.c @@ -470,6 +470,7 @@ static int ecryptfs_link(struct dentry *old_dentry, struct inode *dir, unlock_dir(lower_dir_dentry); dput(lower_new_dentry); dput(lower_old_dentry); + d_drop(lower_old_dentry); d_drop(new_dentry); d_drop(old_dentry); return rc; @@ -484,7 +485,7 @@ static int ecryptfs_unlink(struct inode *dir, struct dentry *dentry) lock_parent(lower_dentry); rc = vfs_unlink(lower_dir_inode, lower_dentry); if (rc) { - ecryptfs_printk(KERN_ERR, "Error in vfs_unlink\n"); + printk(KERN_ERR "Error in vfs_unlink; rc = [%d]\n", rc); goto out_unlock; } ecryptfs_copy_attr_times(dir, lower_dir_inode);