Andrew Price 3dd1dd8c69 GFS2: Use rht_for_each_entry_rcu in glock_hash_walk
This lockdep splat was being triggered on umount:

[55715.973122] ===============================
[55715.980169] [ INFO: suspicious RCU usage. ]
[55715.981021] 4.3.0-11553-g8d3de01-dirty #15 Tainted: G        W
[55715.982353] -------------------------------
[55715.983301] fs/gfs2/glock.c:1427 suspicious rcu_dereference_protected() usage!

The code it refers to is the rht_for_each_entry_safe usage in
glock_hash_walk. The condition that triggers the warning is
lockdep_rht_bucket_is_held(tbl, hash) which is checked in the
__rcu_dereference_protected macro.

The rhashtable buckets are not changed in glock_hash_walk so it's safe
to rely on the rcu protection. Replace the rht_for_each_entry_safe()
usage with rht_for_each_entry_rcu(), which doesn't care whether the
bucket lock is held if the rcu read lock is held.

Signed-off-by: Andrew Price <anprice@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Acked-by: Steven Whitehouse <swhiteho@redhat.com>
2015-11-16 11:57:59 -06:00
..
2014-03-19 15:16:24 +00:00
2015-06-27 09:47:46 -07:00
2014-03-03 13:50:12 +00:00
2015-10-29 12:57:48 -05:00
2015-10-29 12:57:48 -05:00
2015-10-29 12:57:48 -05:00
2013-06-14 11:17:15 +01:00
2013-06-03 14:20:18 -07:00
2015-11-09 15:11:24 -08:00
2014-05-14 10:04:34 +01:00
2015-09-11 12:23:51 -07:00
2015-10-29 12:57:48 -05:00
2015-01-13 10:48:57 +00:00
2015-05-05 13:23:22 -05:00
2012-01-11 09:23:05 +00:00