]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
gfs2: Use mod_delayed_work in gfs2_queue_try_to_evict
authorAndreas Gruenbacher <agruenba@redhat.com>
Fri, 13 Sep 2024 20:56:53 +0000 (22:56 +0200)
committerAndreas Gruenbacher <agruenba@redhat.com>
Tue, 5 Nov 2024 11:39:29 +0000 (12:39 +0100)
In the unlikely case that we're trying to queue GLF_TRY_TO_EVICT work
for an inode that already has GLF_VERIFY_DELETE work queued, we want to
make sure that the GLF_TRY_TO_EVICT work gets scheduled immediately
instead of waiting for the delayed work timer to expire.

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

index 8fff36846145cc34f938dc3029758563ef2c9135..5455f4dd14a31ab801477fb8aac11445791ebe95 100644 (file)
@@ -1008,8 +1008,7 @@ bool gfs2_queue_try_to_evict(struct gfs2_glock *gl)
 
        if (test_and_set_bit(GLF_TRY_TO_EVICT, &gl->gl_flags))
                return false;
-       return queue_delayed_work(sdp->sd_delete_wq,
-                                 &gl->gl_delete, 0);
+       return !mod_delayed_work(sdp->sd_delete_wq, &gl->gl_delete, 0);
 }
 
 bool gfs2_queue_verify_delete(struct gfs2_glock *gl, bool later)