summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/linux/slab.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/linux/slab.h b/include/linux/slab.h
index 5eeedbfffcd2..c6bc05765bdb 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -53,16 +53,18 @@
* stays valid, the trick to using this is relying on an independent
* object validation pass. Something like:
*
+ * begin:
* rcu_read_lock();
- * again:
* obj = lockless_lookup(key);
* if (obj) {
* if (!try_get_ref(obj)) // might fail for free objects
- * goto again;
+ * rcu_read_unlock();
+ * goto begin;
*
* if (obj->key != key) { // not the object we expected
* put_ref(obj);
- * goto again;
+ * rcu_read_unlock();
+ * goto begin;
* }
* }
* rcu_read_unlock();