* [Cluster-devel] [GFS2 PATCH] GFS2: Re-add the rcu_read_lock in glock_hash_walk
[not found] <100800883.21472796.1441202312763.JavaMail.zimbra@redhat.com>
@ 2015-09-02 13:59 ` Bob Peterson
0 siblings, 0 replies; only message in thread
From: Bob Peterson @ 2015-09-02 13:59 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
This patch adds back the call to rcu_read_lock() and corresponding
rcu_read_unlock() in function glock_hash_walk() as suggested by
Andreas.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
---
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index 294f80d..c9c5c45 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -1423,6 +1423,7 @@ static void glock_hash_walk(glock_examiner examiner, const struct gfs2_sbd *sdp)
const struct bucket_table *tbl;
int i;
+ rcu_read_lock();
tbl = rht_dereference_rcu(gl_hash_table.tbl, &gl_hash_table);
for (i = 0; i < tbl->size; i++) {
rht_for_each_entry_safe(gl, pos, next, tbl, i, gl_node) {
@@ -1431,6 +1432,7 @@ static void glock_hash_walk(glock_examiner examiner, const struct gfs2_sbd *sdp)
examiner(gl);
}
}
+ rcu_read_unlock();
cond_resched();
}
^ permalink raw reply related [flat|nested] only message in thread