[Cluster-devel] [GFS2 PATCH] GFS2: Re-add the rcu_read_lock in glock_hash_walk
Bob Peterson
rpeterso at redhat.com
Wed Sep 2 13:59:09 UTC 2015
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 at 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();
}
More information about the Cluster-devel
mailing list