[PATCH v3 05/13] VFS hot tracking, rcu: introduce one rcu macro for list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Zhi Yong Wu <wuzhy@xxxxxxxxxxxxxxxxxx>

  This rcu macro for list will be used in seq_list
rcu interfaces.

Signed-off-by: Chandra Seetharaman <sekharan@xxxxxxxxxx>
Signed-off-by: Zhi Yong Wu <wuzhy@xxxxxxxxxxxxxxxxxx>
---
 include/linux/rculist.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/linux/rculist.h b/include/linux/rculist.h
index f4b1001..380b9be 100644
--- a/include/linux/rculist.h
+++ b/include/linux/rculist.h
@@ -218,6 +218,11 @@ static inline void list_splice_init_rcu(struct list_head *list,
 	at->prev = last;
 }
 
+#define __list_for_each_rcu(pos, head)				\
+	for (pos = rcu_dereference(list_next_rcu(head));	\
+	     pos != head;						\
+	     pos = rcu_dereference(list_next_rcu(pos)))
+
 /**
  * list_entry_rcu - get the struct for this entry
  * @ptr:        the &struct list_head pointer.
-- 
1.7.11.7

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux