From: Erez Zadok Date: Tue, 18 Dec 2007 06:06:30 +0000 (-0500) Subject: Unionfs: initialize inode times for reused inodes X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=c3366937c3c2e905f95787b2244738a902c0e871;p=unionfs-2.6.27.y.git Unionfs: initialize inode times for reused inodes Signed-off-by: Erez Zadok --- diff --git a/fs/unionfs/super.c b/fs/unionfs/super.c index ed3eb0460fe..c474c8624b6 100644 --- a/fs/unionfs/super.c +++ b/fs/unionfs/super.c @@ -55,6 +55,14 @@ static void unionfs_read_inode(struct inode *inode) inode->i_mapping->a_ops = &unionfs_aops; + /* + * reset times so unionfs_copy_attr_all can keep out time invariants + * right (upper inode time being the max of all lower ones). + */ + inode->i_atime.tv_sec = inode->i_atime.tv_nsec = 0; + inode->i_mtime.tv_sec = inode->i_mtime.tv_nsec = 0; + inode->i_ctime.tv_sec = inode->i_ctime.tv_nsec = 0; + unionfs_read_unlock(inode->i_sb); }