public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] RCU Documentation
@ 2006-07-04 15:22 Urs Thuermann
  2006-07-05  6:12 ` Paul E. McKenney
  0 siblings, 1 reply; 2+ messages in thread
From: Urs Thuermann @ 2006-07-04 15:22 UTC (permalink / raw)
  To: linux-kernel

Updater should use _rcu variant of list_del().


urs



Signed-off-by: Urs Thuermann <urs@isnogud.escape.de>

--- linux-2.6.17/Documentation/RCU/whatisRCU.txt.orig
+++ linux-2.6.17/Documentation/RCU/whatisRCU.txt
@@ -677,8 +677,9 @@
 	+	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);
@@ -726,7 +727,7 @@
  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);

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] RCU Documentation
  2006-07-04 15:22 [PATCH] RCU Documentation Urs Thuermann
@ 2006-07-05  6:12 ` Paul E. McKenney
  0 siblings, 0 replies; 2+ messages in thread
From: Paul E. McKenney @ 2006-07-05  6:12 UTC (permalink / raw)
  To: Urs Thuermann; +Cc: linux-kernel

On Tue, Jul 04, 2006 at 05:22:22PM +0200, Urs Thuermann wrote:
> Updater should use _rcu variant of list_del().
> 
> urs

Good catch!!!

Acked-by: Paul E. McKenney <paulmck@us.ibm.com>
> Signed-off-by: Urs Thuermann <urs@isnogud.escape.de>
> 
> --- linux-2.6.17/Documentation/RCU/whatisRCU.txt.orig
> +++ linux-2.6.17/Documentation/RCU/whatisRCU.txt
> @@ -677,8 +677,9 @@
>  	+	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);
> @@ -726,7 +727,7 @@
>   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);
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-07-05  6:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-04 15:22 [PATCH] RCU Documentation Urs Thuermann
2006-07-05  6:12 ` Paul E. McKenney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox