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>
Wed, 12 Jul 2017 13:01:06 +0000 (15:01 +0200)
commit25b2ee6f9d9db9f7efd121cbb39f0db913033d38
treea9b8ddce863907fe1a604ffdec889702d4a6fb9a
parentf59d04e342826cb948724ac43a570702cfc86f36
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