rculist.h: introduce list_entry_rcu() and list_first_entry_rcu()
authorJiri Pirko <jpirko@redhat.com>
Tue, 14 Apr 2009 15:33:57 +0000 (17:33 +0200)
committerIngo Molnar <mingo@elte.hu>
Tue, 14 Apr 2009 16:41:15 +0000 (18:41 +0200)
commit72c6a9870f901045f2464c3dc6ee8914bfdc07aa
tree8bd683fea5f20b17dab613ed8864c016e7b5d369
parent6fd9b3a40b82081d9e6490b0d7cd656e9a78a134
rculist.h: introduce list_entry_rcu() and list_first_entry_rcu()

I've run into the situation where I need to use list_first_entry with
rcu-guarded list. This patch introduces this.

Also simplify list_for_each_entry_rcu() to use new list_entry_rcu()
instead of list_entry().

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: dipankar@in.ibm.com
LKML-Reference: <20090414153356.GC3999@psychotron.englab.brq.redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/linux/rculist.h