From: Bob Peterson Date: Mon, 3 Oct 2016 07:57:49 -0500 Subject: [Cluster-devel] [PATCH 6/6] gfs2: Initialize atime of I_NEW inodes In-Reply-To: <1475499469-9159-1-git-send-email-rpeterso@redhat.com> References: <1475499469-9159-1-git-send-email-rpeterso@redhat.com> Message-ID: <1475499469-9159-7-git-send-email-rpeterso@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit From: Andreas Gruenbacher 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 Signed-off-by: Bob Peterson --- fs/gfs2/inode.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index e0621ca..095c839 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, } gfs2_set_iop(inode); + + inode->i_atime.tv_sec = 0; + inode->i_atime.tv_nsec = 0; + unlock_new_inode(inode); } -- 2.7.4