gfs2: Avoid access time thrashing in gfs2_inode_lookup
authorAndreas Gruenbacher <agruenba@redhat.com>
Wed, 15 Jan 2020 05:26:00 +0000 (06:26 +0100)
committerAndreas Gruenbacher <agruenba@redhat.com>
Wed, 15 Jan 2020 14:20:07 +0000 (15:20 +0100)
commit2b0fb353c029de78f9fb9462290af3f2432749b9
tree382e0f3bcc46c3655ca71fcd5c4c3a34ca16fd9a
parente556280d3691651c38022feaab6d6075adaa03bf
gfs2: Avoid access time thrashing in gfs2_inode_lookup

In gfs2_inode_lookup, we initialize inode->i_atime to the lowest
possibly value after gfs2_inode_refresh may already have been called.
This should be the other way around, but we didn't notice because
usually the inode type is known from the directory entry and so
gfs2_inode_lookup won't call gfs2_inode_refresh.

In addition, only initialize ip->i_no_formal_ino from no_formal_ino when
actually needed.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/inode.c