]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
dlm: use hlist_for_each_entry_srcu for SRCU protected lists
authorLi RongQing <lirongqing@baidu.com>
Mon, 27 Apr 2026 15:59:32 +0000 (11:59 -0400)
committerDavid Teigland <teigland@redhat.com>
Fri, 8 May 2026 13:38:03 +0000 (08:38 -0500)
commita1ed04430f805364eeffe9afacf3ec0d152a8e83
tree3ef3ab7b7917b9d6352b279958492b12b08224ff
parent7fd2df204f342fc17d1a0bfcd474b24232fb0f32
dlm: use hlist_for_each_entry_srcu for SRCU protected lists

The connection and node hash tables in DLM are protected by SRCU, but
the code currently uses hlist_for_each_entry_rcu() for traversal.
While this works functionally, it is semantically incorrect and triggers
warnings when RCU lockdep debugging is enabled, as it expects regular
RCU read-side critical sections.

This patch replaces the incorrect macros with hlist_for_each_entry_srcu()
and adds the appropriate lockdep expressions using srcu_read_lock_held()
to ensure consistency with the underlying locking mechanism.

Signed-off-by: Li RongQing <lirongqing@baidu.com>
Acked-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/lowcomms.c
fs/dlm/midcomms.c