From 019d2df7fda44f653ce49bb72a478cea33c1ac41 Mon Sep 17 00:00:00 2001 From: Urs Thuermann Date: Mon, 10 Jul 2006 04:44:06 -0700 Subject: [PATCH] --- yaml --- r: 32224 b: refs/heads/master c: 82a854ec4f46c5fbef11b06bb49078ecc5784a2d h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/Documentation/RCU/whatisRCU.txt | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 2189cce7bff4..b97e5b723a04 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1454aed92b6b89cb1fbe3cbecd8ceaa7a122f3b7 +refs/heads/master: 82a854ec4f46c5fbef11b06bb49078ecc5784a2d diff --git a/trunk/Documentation/RCU/whatisRCU.txt b/trunk/Documentation/RCU/whatisRCU.txt index 4f41a60e5111..318df44259b3 100644 --- a/trunk/Documentation/RCU/whatisRCU.txt +++ b/trunk/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);