diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2024-09-13 22:56:53 +0200 |
---|---|---|
committer | Andreas Gruenbacher <agruenba@redhat.com> | 2024-11-05 12:39:29 +0100 |
commit | f6ca45e3d2b97ddb4bfcbbe44d1dd18374cd6f85 (patch) | |
tree | ebd04914939c4786c7856c42931d2bec6db70cc9 | |
parent | a6033333ccce01ecada39b3ddabc03fd967e60c0 (diff) |
gfs2: Use mod_delayed_work in gfs2_queue_try_to_evict
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>
-rw-r--r-- | fs/gfs2/glock.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 8fff36846145..5455f4dd14a3 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -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) |