]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/ecryptfs/dentry.c
[ARM] Merge AT91 and devel branches
[linux-2.6-omap-h63xx.git] / fs / ecryptfs / dentry.c
index 0b9992ab990f4cab4983a89aa4eb4f4026a1820b..329efcd3d8c9d672a66799390d5adeceb5150604 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/dcache.h>
 #include <linux/namei.h>
 #include <linux/mount.h>
+#include <linux/fs_stack.h>
 #include "ecryptfs_kernel.h"
 
 /**
@@ -57,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;
 }