summaryrefslogtreecommitdiff
path: root/Documentation/RCU
diff options
context:
space:
mode:
authorUrs Thuermann <urs@isnogud.escape.de>2006-07-10 04:44:06 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-10 13:24:15 -0700
commit82a854ec4f46c5fbef11b06bb49078ecc5784a2d (patch)
treec0a04ec612047065d94d1372871eecdb6401d287 /Documentation/RCU
parent1454aed92b6b89cb1fbe3cbecd8ceaa7a122f3b7 (diff)
downloadlinux-3.10-82a854ec4f46c5fbef11b06bb49078ecc5784a2d.tar.gz
linux-3.10-82a854ec4f46c5fbef11b06bb49078ecc5784a2d.tar.bz2
linux-3.10-82a854ec4f46c5fbef11b06bb49078ecc5784a2d.zip
[PATCH] RCU Documentation fix
Updater should use _rcu variant of list_del(). Signed-off-by: Urs Thuermann <urs@isnogud.escape.de> Acked-by: "Paul E. McKenney" <paulmck@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'Documentation/RCU')
-rw-r--r--Documentation/RCU/whatisRCU.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/Documentation/RCU/whatisRCU.txt b/Documentation/RCU/whatisRCU.txt
index 4f41a60e511..318df44259b 100644
--- a/Documentation/RCU/whatisRCU.txt
+++ b/Documentation/RCU/whatisRCU.txt
@@ -687,8 +687,9 @@ diff shows how closely related RCU and reader-writer locking can be.
+ spin_lock(&listmutex);
list_for_each_entry(p, head, lp) {
if (p->key == key) {
- list_del(&p->list);
+ - list_del(&p->list);
- write_unlock(&listmutex);
+ + list_del_rcu(&p->list);
+ spin_unlock(&listmutex);
+ synchronize_rcu();
kfree(p);
@@ -736,7 +737,7 @@ Or, for those who prefer a side-by-side listing:
5 write_lock(&listmutex); 5 spin_lock(&listmutex);
6 list_for_each_entry(p, head, lp) { 6 list_for_each_entry(p, head, lp) {
7 if (p->key == key) { 7 if (p->key == key) {
- 8 list_del(&p->list); 8 list_del(&p->list);
+ 8 list_del(&p->list); 8 list_del_rcu(&p->list);
9 write_unlock(&listmutex); 9 spin_unlock(&listmutex);
10 synchronize_rcu();
10 kfree(p); 11 kfree(p);