rculist.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589
  1. #ifndef _LINUX_RCULIST_H
  2. #define _LINUX_RCULIST_H
  3. #ifdef __KERNEL__
  4. /*
  5. * RCU-protected list version
  6. */
  7. #include <linux/list.h>
  8. #include <linux/rcupdate.h>
  9. /*
  10. * Why is there no list_empty_rcu()? Because list_empty() serves this
  11. * purpose. The list_empty() function fetches the RCU-protected pointer
  12. * and compares it to the address of the list head, but neither dereferences
  13. * this pointer itself nor provides this pointer to the caller. Therefore,
  14. * it is not necessary to use rcu_dereference(), so that list_empty() can
  15. * be used anywhere you would want to use a list_empty_rcu().
  16. */
  17. /*
  18. * INIT_LIST_HEAD_RCU - Initialize a list_head visible to RCU readers
  19. * @list: list to be initialized
  20. *
  21. * You should instead use INIT_LIST_HEAD() for normal initialization and
  22. * cleanup tasks, when readers have no access to the list being initialized.
  23. * However, if the list being initialized is visible to readers, you
  24. * need to keep the compiler from being too mischievous.
  25. */
  26. static inline void INIT_LIST_HEAD_RCU(struct list_head *list)
  27. {
  28. WRITE_ONCE(list->next, list);
  29. WRITE_ONCE(list->prev, list);
  30. }
  31. /*
  32. * return the ->next pointer of a list_head in an rcu safe
  33. * way, we must not access it directly
  34. */
  35. #define list_next_rcu(list) (*((struct list_head __rcu **)(&(list)->next)))
  36. /*
  37. * Insert a new entry between two known consecutive entries.
  38. *
  39. * This is only for internal list manipulation where we know
  40. * the prev/next entries already!
  41. */
  42. #ifndef CONFIG_DEBUG_LIST
  43. static inline void __list_add_rcu(struct list_head *new,
  44. struct list_head *prev, struct list_head *next)
  45. {
  46. new->next = next;
  47. new->prev = prev;
  48. rcu_assign_pointer(list_next_rcu(prev), new);
  49. next->prev = new;
  50. }
  51. #else
  52. void __list_add_rcu(struct list_head *new,
  53. struct list_head *prev, struct list_head *next);
  54. #endif
  55. /**
  56. * list_add_rcu - add a new entry to rcu-protected list
  57. * @new: new entry to be added
  58. * @head: list head to add it after
  59. *
  60. * Insert a new entry after the specified head.
  61. * This is good for implementing stacks.
  62. *
  63. * The caller must take whatever precautions are necessary
  64. * (such as holding appropriate locks) to avoid racing
  65. * with another list-mutation primitive, such as list_add_rcu()
  66. * or list_del_rcu(), running on this same list.
  67. * However, it is perfectly legal to run concurrently with
  68. * the _rcu list-traversal primitives, such as
  69. * list_for_each_entry_rcu().
  70. */
  71. static inline void list_add_rcu(struct list_head *new, struct list_head *head)
  72. {
  73. __list_add_rcu(new, head, head->next);
  74. }
  75. /**
  76. * list_add_tail_rcu - add a new entry to rcu-protected list
  77. * @new: new entry to be added
  78. * @head: list head to add it before
  79. *
  80. * Insert a new entry before the specified head.
  81. * This is useful for implementing queues.
  82. *
  83. * The caller must take whatever precautions are necessary
  84. * (such as holding appropriate locks) to avoid racing
  85. * with another list-mutation primitive, such as list_add_tail_rcu()
  86. * or list_del_rcu(), running on this same list.
  87. * However, it is perfectly legal to run concurrently with
  88. * the _rcu list-traversal primitives, such as
  89. * list_for_each_entry_rcu().
  90. */
  91. static inline void list_add_tail_rcu(struct list_head *new,
  92. struct list_head *head)
  93. {
  94. __list_add_rcu(new, head->prev, head);
  95. }
  96. /**
  97. * list_del_rcu - deletes entry from list without re-initialization
  98. * @entry: the element to delete from the list.
  99. *
  100. * Note: list_empty() on entry does not return true after this,
  101. * the entry is in an undefined state. It is useful for RCU based
  102. * lockfree traversal.
  103. *
  104. * In particular, it means that we can not poison the forward
  105. * pointers that may still be used for walking the list.
  106. *
  107. * The caller must take whatever precautions are necessary
  108. * (such as holding appropriate locks) to avoid racing
  109. * with another list-mutation primitive, such as list_del_rcu()
  110. * or list_add_rcu(), running on this same list.
  111. * However, it is perfectly legal to run concurrently with
  112. * the _rcu list-traversal primitives, such as
  113. * list_for_each_entry_rcu().
  114. *
  115. * Note that the caller is not permitted to immediately free
  116. * the newly deleted entry. Instead, either synchronize_rcu()
  117. * or call_rcu() must be used to defer freeing until an RCU
  118. * grace period has elapsed.
  119. */
  120. static inline void list_del_rcu(struct list_head *entry)
  121. {
  122. __list_del_entry(entry);
  123. entry->prev = LIST_POISON2;
  124. }
  125. /**
  126. * hlist_del_init_rcu - deletes entry from hash list with re-initialization
  127. * @n: the element to delete from the hash list.
  128. *
  129. * Note: list_unhashed() on the node return true after this. It is
  130. * useful for RCU based read lockfree traversal if the writer side
  131. * must know if the list entry is still hashed or already unhashed.
  132. *
  133. * In particular, it means that we can not poison the forward pointers
  134. * that may still be used for walking the hash list and we can only
  135. * zero the pprev pointer so list_unhashed() will return true after
  136. * this.
  137. *
  138. * The caller must take whatever precautions are necessary (such as
  139. * holding appropriate locks) to avoid racing with another
  140. * list-mutation primitive, such as hlist_add_head_rcu() or
  141. * hlist_del_rcu(), running on this same list. However, it is
  142. * perfectly legal to run concurrently with the _rcu list-traversal
  143. * primitives, such as hlist_for_each_entry_rcu().
  144. */
  145. static inline void hlist_del_init_rcu(struct hlist_node *n)
  146. {
  147. if (!hlist_unhashed(n)) {
  148. __hlist_del(n);
  149. n->pprev = NULL;
  150. }
  151. }
  152. /**
  153. * list_replace_rcu - replace old entry by new one
  154. * @old : the element to be replaced
  155. * @new : the new element to insert
  156. *
  157. * The @old entry will be replaced with the @new entry atomically.
  158. * Note: @old should not be empty.
  159. */
  160. static inline void list_replace_rcu(struct list_head *old,
  161. struct list_head *new)
  162. {
  163. new->next = old->next;
  164. new->prev = old->prev;
  165. rcu_assign_pointer(list_next_rcu(new->prev), new);
  166. new->next->prev = new;
  167. old->prev = LIST_POISON2;
  168. }
  169. /**
  170. * list_splice_init_rcu - splice an RCU-protected list into an existing list.
  171. * @list: the RCU-protected list to splice
  172. * @head: the place in the list to splice the first list into
  173. * @sync: function to sync: synchronize_rcu(), synchronize_sched(), ...
  174. *
  175. * @head can be RCU-read traversed concurrently with this function.
  176. *
  177. * Note that this function blocks.
  178. *
  179. * Important note: the caller must take whatever action is necessary to
  180. * prevent any other updates to @head. In principle, it is possible
  181. * to modify the list as soon as sync() begins execution.
  182. * If this sort of thing becomes necessary, an alternative version
  183. * based on call_rcu() could be created. But only if -really-
  184. * needed -- there is no shortage of RCU API members.
  185. */
  186. static inline void list_splice_init_rcu(struct list_head *list,
  187. struct list_head *head,
  188. void (*sync)(void))
  189. {
  190. struct list_head *first = list->next;
  191. struct list_head *last = list->prev;
  192. struct list_head *at = head->next;
  193. if (list_empty(list))
  194. return;
  195. /*
  196. * "first" and "last" tracking list, so initialize it. RCU readers
  197. * have access to this list, so we must use INIT_LIST_HEAD_RCU()
  198. * instead of INIT_LIST_HEAD().
  199. */
  200. INIT_LIST_HEAD_RCU(list);
  201. /*
  202. * At this point, the list body still points to the source list.
  203. * Wait for any readers to finish using the list before splicing
  204. * the list body into the new list. Any new readers will see
  205. * an empty list.
  206. */
  207. sync();
  208. /*
  209. * Readers are finished with the source list, so perform splice.
  210. * The order is important if the new list is global and accessible
  211. * to concurrent RCU readers. Note that RCU readers are not
  212. * permitted to traverse the prev pointers without excluding
  213. * this function.
  214. */
  215. last->next = at;
  216. rcu_assign_pointer(list_next_rcu(head), first);
  217. first->prev = head;
  218. at->prev = last;
  219. }
  220. /**
  221. * list_entry_rcu - get the struct for this entry
  222. * @ptr: the &struct list_head pointer.
  223. * @type: the type of the struct this is embedded in.
  224. * @member: the name of the list_head within the struct.
  225. *
  226. * This primitive may safely run concurrently with the _rcu list-mutation
  227. * primitives such as list_add_rcu() as long as it's guarded by rcu_read_lock().
  228. */
  229. #define list_entry_rcu(ptr, type, member) \
  230. container_of(lockless_dereference(ptr), type, member)
  231. /**
  232. * Where are list_empty_rcu() and list_first_entry_rcu()?
  233. *
  234. * Implementing those functions following their counterparts list_empty() and
  235. * list_first_entry() is not advisable because they lead to subtle race
  236. * conditions as the following snippet shows:
  237. *
  238. * if (!list_empty_rcu(mylist)) {
  239. * struct foo *bar = list_first_entry_rcu(mylist, struct foo, list_member);
  240. * do_something(bar);
  241. * }
  242. *
  243. * The list may not be empty when list_empty_rcu checks it, but it may be when
  244. * list_first_entry_rcu rereads the ->next pointer.
  245. *
  246. * Rereading the ->next pointer is not a problem for list_empty() and
  247. * list_first_entry() because they would be protected by a lock that blocks
  248. * writers.
  249. *
  250. * See list_first_or_null_rcu for an alternative.
  251. */
  252. /**
  253. * list_first_or_null_rcu - get the first element from a list
  254. * @ptr: the list head to take the element from.
  255. * @type: the type of the struct this is embedded in.
  256. * @member: the name of the list_head within the struct.
  257. *
  258. * Note that if the list is empty, it returns NULL.
  259. *
  260. * This primitive may safely run concurrently with the _rcu list-mutation
  261. * primitives such as list_add_rcu() as long as it's guarded by rcu_read_lock().
  262. */
  263. #define list_first_or_null_rcu(ptr, type, member) \
  264. ({ \
  265. struct list_head *__ptr = (ptr); \
  266. struct list_head *__next = READ_ONCE(__ptr->next); \
  267. likely(__ptr != __next) ? list_entry_rcu(__next, type, member) : NULL; \
  268. })
  269. /**
  270. * list_for_each_entry_rcu - iterate over rcu list of given type
  271. * @pos: the type * to use as a loop cursor.
  272. * @head: the head for your list.
  273. * @member: the name of the list_head within the struct.
  274. *
  275. * This list-traversal primitive may safely run concurrently with
  276. * the _rcu list-mutation primitives such as list_add_rcu()
  277. * as long as the traversal is guarded by rcu_read_lock().
  278. */
  279. #define list_for_each_entry_rcu(pos, head, member) \
  280. for (pos = list_entry_rcu((head)->next, typeof(*pos), member); \
  281. &pos->member != (head); \
  282. pos = list_entry_rcu(pos->member.next, typeof(*pos), member))
  283. /**
  284. * list_for_each_entry_continue_rcu - continue iteration over list of given type
  285. * @pos: the type * to use as a loop cursor.
  286. * @head: the head for your list.
  287. * @member: the name of the list_head within the struct.
  288. *
  289. * Continue to iterate over list of given type, continuing after
  290. * the current position.
  291. */
  292. #define list_for_each_entry_continue_rcu(pos, head, member) \
  293. for (pos = list_entry_rcu(pos->member.next, typeof(*pos), member); \
  294. &pos->member != (head); \
  295. pos = list_entry_rcu(pos->member.next, typeof(*pos), member))
  296. /**
  297. * hlist_del_rcu - deletes entry from hash list without re-initialization
  298. * @n: the element to delete from the hash list.
  299. *
  300. * Note: list_unhashed() on entry does not return true after this,
  301. * the entry is in an undefined state. It is useful for RCU based
  302. * lockfree traversal.
  303. *
  304. * In particular, it means that we can not poison the forward
  305. * pointers that may still be used for walking the hash list.
  306. *
  307. * The caller must take whatever precautions are necessary
  308. * (such as holding appropriate locks) to avoid racing
  309. * with another list-mutation primitive, such as hlist_add_head_rcu()
  310. * or hlist_del_rcu(), running on this same list.
  311. * However, it is perfectly legal to run concurrently with
  312. * the _rcu list-traversal primitives, such as
  313. * hlist_for_each_entry().
  314. */
  315. static inline void hlist_del_rcu(struct hlist_node *n)
  316. {
  317. __hlist_del(n);
  318. n->pprev = LIST_POISON2;
  319. }
  320. /**
  321. * hlist_replace_rcu - replace old entry by new one
  322. * @old : the element to be replaced
  323. * @new : the new element to insert
  324. *
  325. * The @old entry will be replaced with the @new entry atomically.
  326. */
  327. static inline void hlist_replace_rcu(struct hlist_node *old,
  328. struct hlist_node *new)
  329. {
  330. struct hlist_node *next = old->next;
  331. new->next = next;
  332. new->pprev = old->pprev;
  333. rcu_assign_pointer(*(struct hlist_node __rcu **)new->pprev, new);
  334. if (next)
  335. new->next->pprev = &new->next;
  336. old->pprev = LIST_POISON2;
  337. }
  338. /*
  339. * return the first or the next element in an RCU protected hlist
  340. */
  341. #define hlist_first_rcu(head) (*((struct hlist_node __rcu **)(&(head)->first)))
  342. #define hlist_next_rcu(node) (*((struct hlist_node __rcu **)(&(node)->next)))
  343. #define hlist_pprev_rcu(node) (*((struct hlist_node __rcu **)((node)->pprev)))
  344. /**
  345. * hlist_add_head_rcu
  346. * @n: the element to add to the hash list.
  347. * @h: the list to add to.
  348. *
  349. * Description:
  350. * Adds the specified element to the specified hlist,
  351. * while permitting racing traversals.
  352. *
  353. * The caller must take whatever precautions are necessary
  354. * (such as holding appropriate locks) to avoid racing
  355. * with another list-mutation primitive, such as hlist_add_head_rcu()
  356. * or hlist_del_rcu(), running on this same list.
  357. * However, it is perfectly legal to run concurrently with
  358. * the _rcu list-traversal primitives, such as
  359. * hlist_for_each_entry_rcu(), used to prevent memory-consistency
  360. * problems on Alpha CPUs. Regardless of the type of CPU, the
  361. * list-traversal primitive must be guarded by rcu_read_lock().
  362. */
  363. static inline void hlist_add_head_rcu(struct hlist_node *n,
  364. struct hlist_head *h)
  365. {
  366. struct hlist_node *first = h->first;
  367. n->next = first;
  368. n->pprev = &h->first;
  369. rcu_assign_pointer(hlist_first_rcu(h), n);
  370. if (first)
  371. first->pprev = &n->next;
  372. }
  373. /**
  374. * hlist_add_tail_rcu
  375. * @n: the element to add to the hash list.
  376. * @h: the list to add to.
  377. *
  378. * Description:
  379. * Adds the specified element to the specified hlist,
  380. * while permitting racing traversals.
  381. *
  382. * The caller must take whatever precautions are necessary
  383. * (such as holding appropriate locks) to avoid racing
  384. * with another list-mutation primitive, such as hlist_add_head_rcu()
  385. * or hlist_del_rcu(), running on this same list.
  386. * However, it is perfectly legal to run concurrently with
  387. * the _rcu list-traversal primitives, such as
  388. * hlist_for_each_entry_rcu(), used to prevent memory-consistency
  389. * problems on Alpha CPUs. Regardless of the type of CPU, the
  390. * list-traversal primitive must be guarded by rcu_read_lock().
  391. */
  392. static inline void hlist_add_tail_rcu(struct hlist_node *n,
  393. struct hlist_head *h)
  394. {
  395. struct hlist_node *i, *last = NULL;
  396. for (i = hlist_first_rcu(h); i; i = hlist_next_rcu(i))
  397. last = i;
  398. if (last) {
  399. n->next = last->next;
  400. n->pprev = &last->next;
  401. rcu_assign_pointer(hlist_next_rcu(last), n);
  402. } else {
  403. hlist_add_head_rcu(n, h);
  404. }
  405. }
  406. /**
  407. * hlist_add_before_rcu
  408. * @n: the new element to add to the hash list.
  409. * @next: the existing element to add the new element before.
  410. *
  411. * Description:
  412. * Adds the specified element to the specified hlist
  413. * before the specified node while permitting racing traversals.
  414. *
  415. * The caller must take whatever precautions are necessary
  416. * (such as holding appropriate locks) to avoid racing
  417. * with another list-mutation primitive, such as hlist_add_head_rcu()
  418. * or hlist_del_rcu(), running on this same list.
  419. * However, it is perfectly legal to run concurrently with
  420. * the _rcu list-traversal primitives, such as
  421. * hlist_for_each_entry_rcu(), used to prevent memory-consistency
  422. * problems on Alpha CPUs.
  423. */
  424. static inline void hlist_add_before_rcu(struct hlist_node *n,
  425. struct hlist_node *next)
  426. {
  427. n->pprev = next->pprev;
  428. n->next = next;
  429. rcu_assign_pointer(hlist_pprev_rcu(n), n);
  430. next->pprev = &n->next;
  431. }
  432. /**
  433. * hlist_add_behind_rcu
  434. * @n: the new element to add to the hash list.
  435. * @prev: the existing element to add the new element after.
  436. *
  437. * Description:
  438. * Adds the specified element to the specified hlist
  439. * after the specified node while permitting racing traversals.
  440. *
  441. * The caller must take whatever precautions are necessary
  442. * (such as holding appropriate locks) to avoid racing
  443. * with another list-mutation primitive, such as hlist_add_head_rcu()
  444. * or hlist_del_rcu(), running on this same list.
  445. * However, it is perfectly legal to run concurrently with
  446. * the _rcu list-traversal primitives, such as
  447. * hlist_for_each_entry_rcu(), used to prevent memory-consistency
  448. * problems on Alpha CPUs.
  449. */
  450. static inline void hlist_add_behind_rcu(struct hlist_node *n,
  451. struct hlist_node *prev)
  452. {
  453. n->next = prev->next;
  454. n->pprev = &prev->next;
  455. rcu_assign_pointer(hlist_next_rcu(prev), n);
  456. if (n->next)
  457. n->next->pprev = &n->next;
  458. }
  459. #define __hlist_for_each_rcu(pos, head) \
  460. for (pos = rcu_dereference(hlist_first_rcu(head)); \
  461. pos; \
  462. pos = rcu_dereference(hlist_next_rcu(pos)))
  463. /**
  464. * hlist_for_each_entry_rcu - iterate over rcu list of given type
  465. * @pos: the type * to use as a loop cursor.
  466. * @head: the head for your list.
  467. * @member: the name of the hlist_node within the struct.
  468. *
  469. * This list-traversal primitive may safely run concurrently with
  470. * the _rcu list-mutation primitives such as hlist_add_head_rcu()
  471. * as long as the traversal is guarded by rcu_read_lock().
  472. */
  473. #define hlist_for_each_entry_rcu(pos, head, member) \
  474. for (pos = hlist_entry_safe (rcu_dereference_raw(hlist_first_rcu(head)),\
  475. typeof(*(pos)), member); \
  476. pos; \
  477. pos = hlist_entry_safe(rcu_dereference_raw(hlist_next_rcu(\
  478. &(pos)->member)), typeof(*(pos)), member))
  479. /**
  480. * hlist_for_each_entry_rcu_notrace - iterate over rcu list of given type (for tracing)
  481. * @pos: the type * to use as a loop cursor.
  482. * @head: the head for your list.
  483. * @member: the name of the hlist_node within the struct.
  484. *
  485. * This list-traversal primitive may safely run concurrently with
  486. * the _rcu list-mutation primitives such as hlist_add_head_rcu()
  487. * as long as the traversal is guarded by rcu_read_lock().
  488. *
  489. * This is the same as hlist_for_each_entry_rcu() except that it does
  490. * not do any RCU debugging or tracing.
  491. */
  492. #define hlist_for_each_entry_rcu_notrace(pos, head, member) \
  493. for (pos = hlist_entry_safe (rcu_dereference_raw_notrace(hlist_first_rcu(head)),\
  494. typeof(*(pos)), member); \
  495. pos; \
  496. pos = hlist_entry_safe(rcu_dereference_raw_notrace(hlist_next_rcu(\
  497. &(pos)->member)), typeof(*(pos)), member))
  498. /**
  499. * hlist_for_each_entry_rcu_bh - iterate over rcu list of given type
  500. * @pos: the type * to use as a loop cursor.
  501. * @head: the head for your list.
  502. * @member: the name of the hlist_node within the struct.
  503. *
  504. * This list-traversal primitive may safely run concurrently with
  505. * the _rcu list-mutation primitives such as hlist_add_head_rcu()
  506. * as long as the traversal is guarded by rcu_read_lock().
  507. */
  508. #define hlist_for_each_entry_rcu_bh(pos, head, member) \
  509. for (pos = hlist_entry_safe(rcu_dereference_bh(hlist_first_rcu(head)),\
  510. typeof(*(pos)), member); \
  511. pos; \
  512. pos = hlist_entry_safe(rcu_dereference_bh(hlist_next_rcu(\
  513. &(pos)->member)), typeof(*(pos)), member))
  514. /**
  515. * hlist_for_each_entry_continue_rcu - iterate over a hlist continuing after current point
  516. * @pos: the type * to use as a loop cursor.
  517. * @member: the name of the hlist_node within the struct.
  518. */
  519. #define hlist_for_each_entry_continue_rcu(pos, member) \
  520. for (pos = hlist_entry_safe(rcu_dereference_raw(hlist_next_rcu( \
  521. &(pos)->member)), typeof(*(pos)), member); \
  522. pos; \
  523. pos = hlist_entry_safe(rcu_dereference_raw(hlist_next_rcu( \
  524. &(pos)->member)), typeof(*(pos)), member))
  525. /**
  526. * hlist_for_each_entry_continue_rcu_bh - iterate over a hlist continuing after current point
  527. * @pos: the type * to use as a loop cursor.
  528. * @member: the name of the hlist_node within the struct.
  529. */
  530. #define hlist_for_each_entry_continue_rcu_bh(pos, member) \
  531. for (pos = hlist_entry_safe(rcu_dereference_bh(hlist_next_rcu( \
  532. &(pos)->member)), typeof(*(pos)), member); \
  533. pos; \
  534. pos = hlist_entry_safe(rcu_dereference_bh(hlist_next_rcu( \
  535. &(pos)->member)), typeof(*(pos)), member))
  536. /**
  537. * hlist_for_each_entry_from_rcu - iterate over a hlist continuing from current point
  538. * @pos: the type * to use as a loop cursor.
  539. * @member: the name of the hlist_node within the struct.
  540. */
  541. #define hlist_for_each_entry_from_rcu(pos, member) \
  542. for (; pos; \
  543. pos = hlist_entry_safe(rcu_dereference_raw(hlist_next_rcu( \
  544. &(pos)->member)), typeof(*(pos)), member))
  545. #endif /* __KERNEL__ */
  546. #endif