]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
Documentation/atomic_ops.txt: fix sample code
authorFigo.zhang <figo1802@gmail.com>
Tue, 16 Jun 2009 22:33:51 +0000 (15:33 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 17 Jun 2009 02:47:52 +0000 (19:47 -0700)
list_add() lost a parameter in sample code.

Signed-off-by: Figo.zhang <figo1802@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Documentation/atomic_ops.txt

index 4ef245010457fc9301f21f6e78f2b1fc16c1d014..396bec3b74ed12ca1ddbfe980f9ffd4ca4d91308 100644 (file)
@@ -229,10 +229,10 @@ kernel.  It is the use of atomic counters to implement reference
 counting, and it works such that once the counter falls to zero it can
 be guaranteed that no other entity can be accessing the object:
 
-static void obj_list_add(struct obj *obj)
+static void obj_list_add(struct obj *obj, struct list_head *head)
 {
        obj->active = 1;
-       list_add(&obj->list);
+       list_add(&obj->list, head);
 }
 
 static void obj_list_del(struct obj *obj)