]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
gfs2: Remove more dead code in add_to_queue
authorAndreas Gruenbacher <agruenba@redhat.com>
Wed, 5 Feb 2025 13:50:44 +0000 (14:50 +0100)
committerAndreas Gruenbacher <agruenba@redhat.com>
Mon, 10 Mar 2025 17:15:38 +0000 (18:15 +0100)
Remove some more dead code in add_to_queue() that commit 0b93bac2271e
("gfs2: Remove LM_FLAG_PRIORITY flag") has rendered obsolete.  This is a
continuation of commit 3302764610057 ("gfs2: remove dead code in
add_to_queue"); no functional change.

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

index a0e8a44de1959c248964e562b804f755ca8d9c89..dd82bc27c27a0c3884138e934da34a775e92ebb2 100644 (file)
@@ -1483,7 +1483,6 @@ __acquires(&gl->gl_lockref.lock)
 {
        struct gfs2_glock *gl = gh->gh_gl;
        struct gfs2_sbd *sdp = gl->gl_name.ln_sbd;
-       struct list_head *insert_pt = NULL;
        struct gfs2_holder *gh2;
        int try_futile = 0;
 
@@ -1519,21 +1518,11 @@ fail:
                        gfs2_holder_wake(gh);
                        return;
                }
-               if (test_bit(HIF_HOLDER, &gh2->gh_iflags))
-                       continue;
        }
        trace_gfs2_glock_queue(gh, 1);
        gfs2_glstats_inc(gl, GFS2_LKS_QCOUNT);
        gfs2_sbstats_inc(gl, GFS2_LKS_QCOUNT);
-       if (likely(insert_pt == NULL)) {
-               list_add_tail(&gh->gh_list, &gl->gl_holders);
-               return;
-       }
-       list_add_tail(&gh->gh_list, insert_pt);
-       spin_unlock(&gl->gl_lockref.lock);
-       if (sdp->sd_lockstruct.ls_ops->lm_cancel)
-               sdp->sd_lockstruct.ls_ops->lm_cancel(gl);
-       spin_lock(&gl->gl_lockref.lock);
+       list_add_tail(&gh->gh_list, &gl->gl_holders);
        return;
 
 trap_recursive: