[PATCH] idr: document that idr_for_each may be used under rcu_read_lock()

From: Brice Goglin
Date: Mon May 10 2010 - 13:21:52 EST


Hello Nadia,

In commit f9c46d6ea5ce138a886c3a0f10a46130afab75f5, you converted
idr_find() and idr_for_each() to rcu_dereference(). The documentation
of idr_find() was updated to say that it may now be called under
rcu_read_lock(). But the doc of idr_for_each() still says:
"The caller must serialize idr_for_each() vs idr_get_new() and
idr_remove()."

I might be missing something, but assuming idr_for_each() may also be
called under rcu_read_lock(), we need something like the patch below,
right? (I just duplicated the doc update of idr_find())

thanks,
Brice