gfs2: remove dead code in __acquires
Subsystems (2)
PATCH 1/1 gfs2: remove dead code in __acquires
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 <[email protected]>
--- fs/gfs2/glock.c | 1 - 1 file changed, 1 deletion(-)
fs/gfs2/glock.c +0 -1
@@ -1524,7 +1524,6 @@ __acquires(&gl->gl_lockref.lock)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);
Signature · 1 line
2.30.2
Andreas Gruenbacher
maintainerQuoted 23 lines · Su Hui
clang static analyzer complains that value stored to 'gh' is never read. The code of this line is useless after commit
0b93bac2271e("gfs2: RemoveLM_FLAG_PRIORITYflag"). Remove this code to save space.Signed-off-by Su Hui <[email protected]>--- fs/gfs2/glock.c | 1 - 1 file changed, 1 deletion(-)fs/gfs2/glock.c +0
-2@@ -1524,7 +1524,6 @@ __acquires(&gl->gl_lockref.lock)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); --
Quoted 2 lines
2.30.2
Thanks, I'll add this.
(The subject "gfs2: remove dead code in __acquires" is misleading because the function this is in is called add_to_queue(); __acquires is just an annotation.)
Andreas