]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mm/mmu_notifiers: use hlist_for_each_entry_srcu() for SRCU list traversal
authorLi RongQing <lirongqing@baidu.com>
Wed, 4 Feb 2026 08:09:37 +0000 (03:09 -0500)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 5 Apr 2026 20:53:02 +0000 (13:53 -0700)
commitb0fbe8c3414d26d43f76cc9c4c1ae8eb51a04428
tree2975d78429fcc5f55348d421f5a6ba3a00821ebf
parent80a4bcac69348e32ccb5ab46401ac2a416fcb576
mm/mmu_notifiers: use hlist_for_each_entry_srcu() for SRCU list traversal

The mmu_notifier_subscriptions list is protected by SRCU.  While the
current code uses hlist_for_each_entry_rcu() with an explicit SRCU lockdep
check, it is more appropriate to use the dedicated
hlist_for_each_entry_srcu() macro.

This change aligns the code with the preferred kernel API for
SRCU-protected lists, improving code clarity and ensuring that the
synchronization method is explicitly documented by the iterator name
itself.

Link: https://lkml.kernel.org/r/20260204080937.2472-1-lirongqing@baidu.com
Signed-off-by: Li RongQing <lirongqing@baidu.com>
Acked-by: SeongJae Park <sj@kernel.org>
Cc: David Hildenbrand <david@kernel.org>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/mmu_notifier.c