提交 332f51d7 编写于 作者: A Andreas Gruenbacher 提交者: Bob Peterson

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: NAndreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: NBob Peterson <rpeterso@redhat.com>
上级 d7c436cd
...@@ -187,6 +187,10 @@ struct inode *gfs2_inode_lookup(struct super_block *sb, unsigned int type, ...@@ -187,6 +187,10 @@ struct inode *gfs2_inode_lookup(struct super_block *sb, unsigned int type,
} }
gfs2_set_iop(inode); gfs2_set_iop(inode);
inode->i_atime.tv_sec = 0;
inode->i_atime.tv_nsec = 0;
unlock_new_inode(inode); unlock_new_inode(inode);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册