Unionfs: update inode times after a successful open
authorErez Zadok <ezk@cs.sunysb.edu>
Tue, 25 Dec 2007 22:31:14 +0000 (17:31 -0500)
committerErez Zadok <ezk@cs.sunysb.edu>
Tue, 25 Dec 2007 22:31:14 +0000 (17:31 -0500)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/commonfops.c

index b582dae3b07232715837f7933f5eaf36a8c31131..7ae1c5be391e2c65263bc6fdcd14eb8476a2d6d6 100644 (file)
@@ -583,10 +583,13 @@ out:
                kfree(UNIONFS_F(file));
        }
 out_nofree:
-       unionfs_check_inode(inode);
        if (!err) {
+               dentry = file->f_dentry;
+               unionfs_copy_attr_times(dentry->d_parent->d_inode);
+               unionfs_copy_attr_times(inode);
                unionfs_check_file(file);
-               unionfs_check_dentry(file->f_dentry->d_parent);
+               unionfs_check_dentry(dentry->d_parent);
+               unionfs_check_inode(inode);
        }
        unionfs_read_unlock(inode->i_sb);
        return err;