From: Erez Zadok <[EMAIL PROTECTED]>

Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
Signed-off-by: Josef 'Jeff' Sipek <[EMAIL PROTECTED]>
---
 fs/unionfs/super.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/unionfs/super.c b/fs/unionfs/super.c
index 1de41ea..339afab 100644
--- a/fs/unionfs/super.c
+++ b/fs/unionfs/super.c
@@ -736,7 +736,7 @@ out_no_change:
        for (i=dbstart(sb->s_root); i<=dbend(sb->s_root); i++) {
                struct dentry *lower_dentry =
                        unionfs_lower_dentry_idx(sb->s_root, i);
-               atomic_inc(&lower_dentry->d_inode->i_count);
+               igrab(lower_dentry->d_inode);
                new_lower_inodes[i] = lower_dentry->d_inode;
        }
        /* 2. release reference on all older lower inodes */
@@ -758,11 +758,11 @@ out_no_change:
        i = atomic_inc_return(&UNIONFS_SB(sb)->generation);
        atomic_set(&UNIONFS_D(sb->s_root)->generation, i);
        atomic_set(&UNIONFS_I(sb->s_root->d_inode)->generation, i);
-
-       err = 0;                /* reset to success */
-
        if (!(*flags & MS_SILENT))
                printk("unionfs: new generation number %d\n", i);
+       /* finally, update the root dentry's times */
+       unionfs_copy_attr_times(sb->s_root->d_inode);
+       err = 0;                /* reset to success */
 
        /*
         * The code above falls through to the next label, and releases the
-- 
1.5.2.2.238.g7cbf2f2

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to