diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2016-09-26 14:24:34 -0400 |
---|---|---|
committer | Bob Peterson <rpeterso@redhat.com> | 2016-09-26 14:24:34 -0400 |
commit | 332f51d7db13ffb7fcbe2407ed5b3667bc3750a7 (patch) | |
tree | 6876170734199df2b220b7257b3054faeedcd733 /fs/gfs2 | |
parent | d7c436cd605eb203ecf64c40f9b18aa610ac0248 (diff) |
gfs2: Initialize atime of I_NEW inodes
Fix for commit 719ee344: initialize atime of I_NEW inodes to 0 so that
the timestamps read from disk will always be more recent than the
initial timestamp, and the atime in the I_NEW inode will be set correctly.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r-- | fs/gfs2/inode.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index e0621cacf134..095c839d44f4 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c | |||
@@ -187,6 +187,10 @@ struct inode *gfs2_inode_lookup(struct super_block *sb, unsigned int type, | |||
187 | } | 187 | } |
188 | 188 | ||
189 | gfs2_set_iop(inode); | 189 | gfs2_set_iop(inode); |
190 | |||
191 | inode->i_atime.tv_sec = 0; | ||
192 | inode->i_atime.tv_nsec = 0; | ||
193 | |||
190 | unlock_new_inode(inode); | 194 | unlock_new_inode(inode); |
191 | } | 195 | } |
192 | 196 | ||