]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
gfs2: Minor do_xmote cancelation fix
authorAndreas Gruenbacher <agruenba@redhat.com>
Tue, 8 Jul 2025 19:21:27 +0000 (21:21 +0200)
committerAndreas Gruenbacher <agruenba@redhat.com>
Wed, 9 Jul 2025 18:04:14 +0000 (20:04 +0200)
Commit 6cb3b1c2df87 changed how finish_xmote() clears the GLF_LOCK flag,
but it failed to adjust the equivalent code in do_xmote().  Fix that.

Fixes: 6cb3b1c2df87 ("gfs2: Fix additional unlikely request cancelation race")
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/glock.c

index ba25b884169e501dfe2c2ef6d0fccd3d6b0c165c..ea96113edbe31bb5a31b413f4bcc6fe0ac9ad2cd 100644 (file)
@@ -802,7 +802,8 @@ skip_inval:
                         * We skip telling dlm to do the locking, so we won't get a
                         * reply that would otherwise clear GLF_LOCK. So we clear it here.
                         */
-                       clear_bit(GLF_LOCK, &gl->gl_flags);
+                       if (!test_bit(GLF_CANCELING, &gl->gl_flags))
+                               clear_bit(GLF_LOCK, &gl->gl_flags);
                        clear_bit(GLF_DEMOTE_IN_PROGRESS, &gl->gl_flags);
                        gfs2_glock_queue_work(gl, GL_GLOCK_DFT_HOLD);
                        return;