]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
gfs2: Get rid of GLF_INVALIDATE_IN_PROGRESS
authorAndreas Gruenbacher <agruenba@redhat.com>
Fri, 8 Aug 2025 21:26:12 +0000 (23:26 +0200)
committerAndreas Gruenbacher <agruenba@redhat.com>
Fri, 12 Sep 2025 10:02:41 +0000 (12:02 +0200)
commitbddb53b776fb7ce81dfba7c24884d9f2c0c68e50
treee4649d13b51bbbb87f2596f5d19d49d3d7af021c
parent061df28b82af6b22fb5fa529a8f2ef00474ee004
gfs2: Get rid of GLF_INVALIDATE_IN_PROGRESS

Get rid of the GLF_INVALIDATE_IN_PROGRESS flag: it was originally used
to indicate to add_to_queue() that the ->go_sync() and ->go_invalid()
operations were in progress, but as we have established in commit "gfs2:
Fix LM_FLAG_TRY* logic in add_to_queue", add_to_queue() has no need to
know.

Commit d99724c3c36a describes a race in which GLF_INVALIDATE_IN_PROGRESS
is used to serialize two processes which are both in do_xmote() at the
same time.  That analysis is wrong: the serialization happens via the
GLF_LOCK flag, which ensures that at most one glock operation can be
active at any time.

Fixes: d99724c3c36a ("gfs2: Close timing window with GLF_INVALIDATE_IN_PROGRESS")
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: Andrew Price <anprice@redhat.com>
fs/gfs2/glock.c
fs/gfs2/incore.h
fs/gfs2/trace_gfs2.h