From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bob Peterson Date: Wed, 2 Sep 2015 09:59:09 -0400 (EDT) Subject: [Cluster-devel] [GFS2 PATCH] GFS2: Re-add the rcu_read_lock in glock_hash_walk In-Reply-To: <100800883.21472796.1441202312763.JavaMail.zimbra@redhat.com> Message-ID: <90861305.21473322.1441202349087.JavaMail.zimbra@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 --- 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(); }