From mboxrd@z Thu Jan 1 00:00:00 1970 From: zwu.kernel@gmail.com Subject: [PATCH v2 05/12] VFS hot tracking, rcu: introduce one rcu macro for list Date: Tue, 14 May 2013 08:59:37 +0800 Message-ID: <1368493184-5939-6-git-send-email-zwu.kernel@gmail.com> References: <1368493184-5939-1-git-send-email-zwu.kernel@gmail.com> Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-btrfs@vger.kernel.org, sekharan@us.ibm.com, linuxram@us.ibm.com, david@fromorbit.com, dsterba@suse.cz, gregkh@linuxfoundation.org, paulmck@linux.vnet.ibm.com, chris.mason@fusionio.com, Zhi Yong Wu To: viro@zeniv.linux.org.uk Return-path: In-Reply-To: <1368493184-5939-1-git-send-email-zwu.kernel@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org From: Zhi Yong Wu This rcu macro for list will be used in seq_list rcu interfaces. Signed-off-by: Chandra Seetharaman Signed-off-by: Zhi Yong Wu --- include/linux/rculist.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/rculist.h b/include/linux/rculist.h index 8089e35..a3fa055 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