From f0e56edc2ec7a40f4e94590172f21317baafb196 Mon Sep 17 00:00:00 2001 From: Andreas Gruenbacher Date: Wed, 21 Dec 2022 00:52:51 +0100 Subject: gfs2: Split the two kinds of glock "delete" work Function delete_work_func() is used for two purposes: * to immediately try to evict the glock's inode, and * to verify after a little while that the inode has been deleted as expected, and didn't just get skipped. These two operations are not separated very well, so introduce two new glock flags to improved that. Split gfs2_queue_delete_work() into gfs2_queue_try_to_evict and gfs2_queue_verify_evict(). Signed-off-by: Andreas Gruenbacher --- fs/gfs2/glops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/gfs2/glops.c') diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c index 68676bc78171..e4c585f16ddd 100644 --- a/fs/gfs2/glops.c +++ b/fs/gfs2/glops.c @@ -651,7 +651,7 @@ static void iopen_go_callback(struct gfs2_glock *gl, bool remote) if (gl->gl_demote_state == LM_ST_UNLOCKED && gl->gl_state == LM_ST_SHARED && ip) { gl->gl_lockref.count++; - if (!gfs2_queue_delete_work(gl, 0)) + if (!gfs2_queue_try_to_evict(gl)) gl->gl_lockref.count--; } } -- cgit v1.2.3