Skip to content

Commit

Permalink
gfs2: Initialize atime of I_NEW inodes
Browse files Browse the repository at this point in the history
Fix for commit 719ee34: 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>
  • Loading branch information
Andreas Gruenbacher authored and Bob Peterson committed Sep 26, 2016
1 parent d7c436c commit 332f51d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fs/gfs2/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ struct inode *gfs2_inode_lookup(struct super_block *sb, unsigned int type,
}

gfs2_set_iop(inode);

inode->i_atime.tv_sec = 0;
inode->i_atime.tv_nsec = 0;

unlock_new_inode(inode);
}

Expand Down

0 comments on commit 332f51d

Please sign in to comment.