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)
committerRaspbian kernel package updater <root@raspbian.org>
Sun, 23 Jul 2017 02:57:24 +0000 (02:57 +0000)
commit5e6613fb9cf88ab2164842609879d759bb3f23c8
tree05de1a9b4754087c33f9f6bceb273e9df4d4e093
parent96f8da379a56b77a1ff64498da60f3c8a053b303
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