]> Gentwo Git Trees - linux/.git/commit
gfs2: Fix LM_FLAG_TRY* logic in add_to_queue
authorAndreas Gruenbacher <agruenba@redhat.com>
Fri, 8 Aug 2025 20:31:59 +0000 (22:31 +0200)
committerAndreas Gruenbacher <agruenba@redhat.com>
Fri, 12 Sep 2025 10:02:28 +0000 (12:02 +0200)
commit0c23e24164d83086e75581b0cf930f4e161636d6
treeaae28d8267668d37caa22b3d0a3313d5e0ac72a5
parent2b813a72880dcc90ab5997e2307f961b5a8650bd
gfs2: Fix LM_FLAG_TRY* logic in add_to_queue

The logic in add_to_queue() for determining whether a LM_FLAG_TRY or
LM_FLAG_TRY_1CB holder should be queued does not make any sense: we are
interested in wether or not the new operation will block behind an
existing or future holder in the queue, but the current code checks for
ongoing locking or ->go_inval() operations, which has little to do with
that.

Replace that code with something more sensible, remove the incorrect
add_to_queue() function annotations, remove the similarly misguided
do_error(gl, 0) call in do_xmote(), and add a missing comment to the
same call in do_promote().

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