gfs2: Fix "ignore unlock failures after withdraw"
authorAndreas Gruenbacher <agruenba@redhat.com>
Fri, 5 Apr 2024 11:47:51 +0000 (13:47 +0200)
committerAndreas Gruenbacher <agruenba@redhat.com>
Tue, 9 Apr 2024 16:35:58 +0000 (18:35 +0200)
commit5d9231111966b6c5a65016d58dcbeab91055bc91
treeef17cdf5ae294389f6c07df33af7a2c78e12c01f
parent262ee3a07e98e8e56230547d4fe75d485348a55a
gfs2: Fix "ignore unlock failures after withdraw"

Commit 3e11e53041502 tries to suppress dlm_lock() lock conversion errors
that occur when the lockspace has already been released.

It does that by setting and checking the SDF_SKIP_DLM_UNLOCK flag.  This
conflicts with the intended meaning of the SDF_SKIP_DLM_UNLOCK flag, so
check whether the lockspace is still allocated instead.

(Given the current DLM API, checking for this kind of error after the
fact seems easier that than to make sure that the lockspace is still
allocated before calling dlm_lock().  Changing the DLM API so that users
maintain the lockspace references themselves would be an option.)

Fixes: 3e11e53041502 ("GFS2: ignore unlock failures after withdraw")
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/glock.c
fs/gfs2/util.c