summaryrefslogtreecommitdiff
path: root/include/linux/list.h
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2025-07-10 15:15:28 +0300
committerPaul E. McKenney <paulmck@kernel.org>2025-08-25 10:13:26 -0700
commita214365140cc3009f07d4e14a8b481fd3dc41d31 (patch)
tree11aa20c4f1608571db19112f2f46a2c64c8da794 /include/linux/list.h
parent42d590d100f2e47e47d974a902b9ed610e464824 (diff)
rculist: move list_for_each_rcu() to where it belongs
The list_for_each_rcu() relies on the rcu_dereference() API which is not provided by the list.h. At the same time list.h is a low-level basic header that must not have dependencies like RCU, besides the fact of the potential circular dependencies in some cases. With all that said, move RCU related API to the rculist.h where it belongs. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simona Vetter <simona.vetter@ffwll.ch> Reviewed-by: "Paul E. McKenney" <paulmck@kernel.org> Signed-off-by: Neeraj Upadhyay (AMD) <neeraj.upadhyay@kernel.org> Signed-off-by: "Paul E. McKenney" <paulmck@kernel.org>
Diffstat (limited to 'include/linux/list.h')
-rw-r--r--include/linux/list.h10
1 files changed, 0 insertions, 10 deletions
diff --git a/include/linux/list.h b/include/linux/list.h
index e7e28afd28f8..e7bdad9b8618 100644
--- a/include/linux/list.h
+++ b/include/linux/list.h
@@ -687,16 +687,6 @@ static inline void list_splice_tail_init(struct list_head *list,
for (pos = (head)->next; !list_is_head(pos, (head)); pos = pos->next)
/**
- * list_for_each_rcu - Iterate over a list in an RCU-safe fashion
- * @pos: the &struct list_head to use as a loop cursor.
- * @head: the head for your list.
- */
-#define list_for_each_rcu(pos, head) \
- for (pos = rcu_dereference((head)->next); \
- !list_is_head(pos, (head)); \
- pos = rcu_dereference(pos->next))
-
-/**
* list_for_each_continue - continue iteration over a list
* @pos: the &struct list_head to use as a loop cursor.
* @head: the head for your list.