gfs2: remove dead code in add_to_queue
authorSu Hui <suhui@nfschina.com>
Thu, 2 Nov 2023 01:51:42 +0000 (09:51 +0800)
committerAndreas Gruenbacher <agruenba@redhat.com>
Mon, 6 Nov 2023 00:51:26 +0000 (01:51 +0100)
clang static analyzer complains that value stored to 'gh' is never read.
The code of this line is useless after commit 0b93bac2271e
("gfs2: Remove LM_FLAG_PRIORITY flag"). Remove this code to save space.

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

index 4a280be229a6517b3a9bdd219051b0967af0249f..b290f8d172d7a37897d147a4c10d65f47bfcf8f6 100644 (file)
@@ -1524,7 +1524,6 @@ fail:
                return;
        }
        list_add_tail(&gh->gh_list, insert_pt);
-       gh = list_first_entry(&gl->gl_holders, struct gfs2_holder, gh_list);
        spin_unlock(&gl->gl_lockref.lock);
        if (sdp->sd_lockstruct.ls_ops->lm_cancel)
                sdp->sd_lockstruct.ls_ops->lm_cancel(gl);