gfs2: Remove redundant check for GLF_INSTANTIATE_NEEDED
authorAndreas Gruenbacher <agruenba@redhat.com>
Tue, 30 Nov 2021 09:06:11 +0000 (10:06 +0100)
committerAndreas Gruenbacher <agruenba@redhat.com>
Sat, 4 Dec 2021 19:02:26 +0000 (20:02 +0100)
If the GLF_INSTANTIATE_NEEDED flag isn't set, gfs2_instantiate() is a
no-op.

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

index 0f93e8b..64c6709 100644 (file)
@@ -1244,11 +1244,9 @@ static enum dinode_demise evict_should_delete(struct inode *inode,
        if (ret)
                return SHOULD_NOT_DELETE_DINODE;
 
-       if (test_bit(GLF_INSTANTIATE_NEEDED, &ip->i_gl->gl_flags)) {
-               ret = gfs2_instantiate(gh);
-               if (ret)
-                       return SHOULD_NOT_DELETE_DINODE;
-       }
+       ret = gfs2_instantiate(gh);
+       if (ret)
+               return SHOULD_NOT_DELETE_DINODE;
 
        /*
         * The inode may have been recreated in the meantime.