]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
gfs2: Simply dequeue iopen glock in gfs2_evict_inode
authorAndreas Gruenbacher <agruenba@redhat.com>
Sun, 4 Dec 2022 12:27:11 +0000 (13:27 +0100)
committerAndreas Gruenbacher <agruenba@redhat.com>
Tue, 6 Dec 2022 15:06:32 +0000 (16:06 +0100)
With the previous change, to simplify things, we can always just dequeue
and uninitialize the iopen glock in gfs2_evict_inode() even if it isn't
queued anymore.

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

index 02f1b5f2d7f227e5e394cf8367167e46d0b1a6b9..999cc146d7083447d2f057d23322a7d39f26aea2 100644 (file)
@@ -1419,12 +1419,9 @@ out:
                struct gfs2_glock *gl = ip->i_iopen_gh.gh_gl;
 
                glock_clear_object(gl, ip);
-               if (test_bit(HIF_HOLDER, &ip->i_iopen_gh.gh_iflags)) {
-                       ip->i_iopen_gh.gh_flags |= GL_NOCACHE;
-                       gfs2_glock_dq(&ip->i_iopen_gh);
-               }
                gfs2_glock_hold(gl);
-               gfs2_holder_uninit(&ip->i_iopen_gh);
+               ip->i_iopen_gh.gh_flags |= GL_NOCACHE;
+               gfs2_glock_dq_uninit(&ip->i_iopen_gh);
                gfs2_glock_put_eventually(gl);
        }
        if (ip->i_gl) {