From 73118ca8baf78dddd1f9c8ac67c1d80b47d9830e Mon Sep 17 00:00:00 2001 From: Bob Peterson Date: Fri, 5 Apr 2019 04:41:38 +0100 Subject: gfs2: Replace gl_revokes with a GLF flag The gl_revokes value determines how many outstanding revokes a glock has on the superblock revokes list; this is used to avoid unnecessary log flushes. However, gl_revokes is only ever tested for being zero, and it's only decremented in revoke_lo_after_commit, which removes all revokes from the list, so we know that the gl_revoke values of all the glocks on the list will reach zero. Therefore, we can replace gl_revokes with a bit flag. This saves an atomic counter in struct gfs2_glock. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher --- fs/gfs2/main.c | 1 - 1 file changed, 1 deletion(-) (limited to 'fs/gfs2/main.c') diff --git a/fs/gfs2/main.c b/fs/gfs2/main.c index 136484ef35d3..c700738de1f7 100644 --- a/fs/gfs2/main.c +++ b/fs/gfs2/main.c @@ -59,7 +59,6 @@ static void gfs2_init_glock_once(void *foo) INIT_LIST_HEAD(&gl->gl_lru); INIT_LIST_HEAD(&gl->gl_ail_list); atomic_set(&gl->gl_ail_count, 0); - atomic_set(&gl->gl_revokes, 0); } static void gfs2_init_gl_aspace_once(void *foo) -- cgit v1.2.3