diff options
author | Bob Peterson <rpeterso@redhat.com> | 2021-10-05 09:10:51 -0500 |
---|---|---|
committer | Andreas Gruenbacher <agruenba@redhat.com> | 2021-10-25 08:42:19 +0200 |
commit | ec1d398dd780d42f84d58acdc6cca599d4a12c16 (patch) | |
tree | 3ae5ea19703b8c1fcec7a53644b9d0527ebff019 /fs/gfs2/glops.c | |
parent | f2e70d8f2fdff0707b3f4de4ef87f93e4396320c (diff) | |
download | linux-stable-ec1d398dd780d42f84d58acdc6cca599d4a12c16.tar.gz linux-stable-ec1d398dd780d42f84d58acdc6cca599d4a12c16.tar.bz2 linux-stable-ec1d398dd780d42f84d58acdc6cca599d4a12c16.zip |
gfs2: Eliminate GIF_INVALID flag
With the addition of the new GLF_INSTANTIATE_NEEDED flag, the
GIF_INVALID flag is now redundant. This patch removes it.
Since inode_instantiate is only called when instantiation is needed,
the check in inode_instantiate is removed too.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2/glops.c')
-rw-r--r-- | fs/gfs2/glops.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c index e2656baf38a3..0b6a59f71eef 100644 --- a/fs/gfs2/glops.c +++ b/fs/gfs2/glops.c @@ -356,7 +356,6 @@ static void inode_go_inval(struct gfs2_glock *gl, int flags) struct address_space *mapping = gfs2_glock2aspace(gl); truncate_inode_pages(mapping, 0); if (ip) { - set_bit(GIF_INVALID, &ip->i_flags); set_bit(GLF_INSTANTIATE_NEEDED, &gl->gl_flags); forget_all_cached_acls(&ip->i_inode); security_inode_invalidate_secctx(&ip->i_inode); @@ -477,8 +476,6 @@ int gfs2_inode_refresh(struct gfs2_inode *ip) error = gfs2_dinode_in(ip, dibh->b_data); brelse(dibh); - clear_bit(GIF_INVALID, &ip->i_flags); - return error; } @@ -499,11 +496,9 @@ static int inode_go_instantiate(struct gfs2_holder *gh) if (!ip) /* no inode to populate - read it in later */ goto out; - if (test_bit(GIF_INVALID, &ip->i_flags)) { - error = gfs2_inode_refresh(ip); - if (error) - goto out; - } + error = gfs2_inode_refresh(ip); + if (error) + goto out; if (gh->gh_state != LM_ST_DEFERRED) inode_dio_wait(&ip->i_inode); |