]> git.ipfire.org Git - thirdparty/linux.git/commit
gfs2: sanitize the gdlm_ast -> finish_xmote interface
authorAndreas Gruenbacher <agruenba@redhat.com>
Wed, 25 Jun 2025 12:41:58 +0000 (14:41 +0200)
committerAndreas Gruenbacher <agruenba@redhat.com>
Tue, 15 Jul 2025 02:20:40 +0000 (04:20 +0200)
commit6e417b3eb836432860284edb75c48f436adb4feb
tree660ca3137d0f9161220374ce2c5a1e00666cdd02
parent75bb2ddea9640b663e4b2eaa06e15196f6f11a95
gfs2: sanitize the gdlm_ast -> finish_xmote interface

When gdlm_ast() is called with a non-zero status code, this means that
the requested operation did not succeed and the current lock state
didn't change.  Turn that into a non-zero LM_OUT_* status code (with ret
& ~LM_OUT_ST_MASK != 0) instead of pretending that dlm returned the
current lock state.

That way, we can easily change finish_xmote() to only update
gl->gl_state when the state has actually changed.

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