diff options
author | Michael Halcrow <mhalcrow@us.ibm.com> | 2006-11-16 01:19:30 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-11-16 11:43:38 -0800 |
commit | ae56fb16337c882c52806508f93ead4034004c7a (patch) | |
tree | f2bb551db8d2d9b92c90b5f5462a3617457771bd /fs/ecryptfs/dentry.c | |
parent | 31be8309532a6743f301cb2e83bd12ca07988b09 (diff) |
[PATCH] eCryptfs: CIFS nlink fixes
When CIFS is the lower filesystem, the old lower dentry needs to be explicitly
dropped from inside eCryptfs to force a revalidate. In addition, when CIFS is
the lower filesystem, the inode attributes need to be copied back up from the
lower inode to the eCryptfs inode on an eCryptfs revalidate.
Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/ecryptfs/dentry.c')
-rw-r--r-- | fs/ecryptfs/dentry.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/ecryptfs/dentry.c b/fs/ecryptfs/dentry.c index 0b9992ab990..52d1e36dc74 100644 --- a/fs/ecryptfs/dentry.c +++ b/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; } |