[Cluster-devel] [GFS2 PATCH 2/2] GFS2: Use resizable hash table for glocks

Andreas Gruenbacher agruenba at redhat.com
Mon Aug 24 13:46:08 UTC 2015


Bob,

2015-07-09 20:25 GMT+02:00 Bob Peterson <rpeterso at redhat.com>:
> @@ -202,9 +176,8 @@ void gfs2_glock_put(struct gfs2_glock *gl)
>
>         gfs2_glock_remove_from_lru(gl);
>         spin_unlock(&gl->gl_lockref.lock);
> -       spin_lock_bucket(gl->gl_hash);
> -       hlist_bl_del_rcu(&gl->gl_list);
> -       spin_unlock_bucket(gl->gl_hash);
> +       if (gl->gl_node.next != NULL)
> +               rhashtable_remove_fast(&gl_hash_table, &gl->gl_node, ht_parms);
>         GLOCK_BUG_ON(gl, !list_empty(&gl->gl_holders));
>         GLOCK_BUG_ON(gl, mapping && mapping->nrpages);
>         trace_gfs2_glock_put(gl);

what does the added if do?

Thanks,
Andreas




More information about the Cluster-devel mailing list