gfs2: Fix glock rhashtable rcu bug
authorAndreas Gruenbacher <agruenba@redhat.com>
Fri, 7 Jul 2017 18:22:05 +0000 (13:22 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Jul 2017 09:57:46 +0000 (11:57 +0200)
commite952c291df099fe71d3d1737c68063734907f418
tree4bdbacc843bdc57ea300d4e9d580f435cc93d1a3
parentac12d6abed6cf495908c896b1c4357a906cc7303
gfs2: Fix glock rhashtable rcu bug

commit 961ae1d83d055a4b9ebbfb4cc8ca62ec1a7a3b74 upstream.

Before commit 88ffbf3e03 "GFS2: Use resizable hash table for glocks",
glocks were freed via call_rcu to allow reading the glock hashtable
locklessly using rcu.  This was then changed to free glocks immediately,
which made reading the glock hashtable unsafe.  Bring back the original
code for freeing glocks via call_rcu.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/gfs2/glock.c
fs/gfs2/incore.h