gfs2: Use rhashtable walk interface in glock_hash_walk
authorHerbert Xu <herbert@gondor.apana.org.au>
Wed, 24 May 2017 01:53:36 +0000 (21:53 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Jun 2017 04:41:50 +0000 (06:41 +0200)
commit2557969fb4f703f1364a58fabde53e6567b46120
treedf1d5762ad61396098831d05be201646a88cc1ed
parent44bc7cae603167feb86b7f8f0684df62ffaac7f4
gfs2: Use rhashtable walk interface in glock_hash_walk

[ Upstream commit 6a25478077d987edc5e2f880590a2bc5fcab4441 ]

The function glock_hash_walk walks the rhashtable by hand.  This
is broken because if it catches the hash table in the middle of
a rehash, then it will miss entries.

This patch replaces the manual walk by using the rhashtable walk
interface.

Fixes: 88ffbf3e037e ("GFS2: Use resizable hash table for glocks")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/gfs2/glock.c