Unionfs: update inode times after a successful open
authorErez Zadok <ezk@cs.sunysb.edu>
Sun, 23 Dec 2007 01:45:47 +0000 (20:45 -0500)
committerErez Zadok <ezk@cs.sunysb.edu>
Fri, 12 Aug 2011 02:37:20 +0000 (22:37 -0400)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/commonfops.c

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