diff options
author | David S. Miller <davem@davemloft.net> | 2011-02-19 22:17:35 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-02-19 22:17:35 -0500 |
commit | da935c66bacb3ed9ada984b053297f87c2dff63a (patch) | |
tree | 46278da2b312c73f1375b830d7e5912bf23abd78 /lib | |
parent | 9435eb1cf0b76b323019cebf8d16762a50a12a19 (diff) | |
parent | 2205a6ea93fea76f88b43727fea53f3ce3790d6f (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
Documentation/feature-removal-schedule.txt
drivers/net/e1000e/netdev.c
net/xfrm/xfrm_policy.c
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Kconfig.debug | 2 | ||||
-rw-r--r-- | lib/list_debug.c | 39 | ||||
-rw-r--r-- | lib/radix-tree.c | 7 | ||||
-rw-r--r-- | lib/rbtree.c | 3 |
4 files changed, 34 insertions, 17 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 3967c2356e37..2b97418c67e2 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -805,7 +805,7 @@ config ARCH_WANT_FRAME_POINTERS | |||
805 | config FRAME_POINTER | 805 | config FRAME_POINTER |
806 | bool "Compile the kernel with frame pointers" | 806 | bool "Compile the kernel with frame pointers" |
807 | depends on DEBUG_KERNEL && \ | 807 | depends on DEBUG_KERNEL && \ |
808 | (CRIS || M68K || M68KNOMMU || FRV || UML || \ | 808 | (CRIS || M68K || FRV || UML || \ |
809 | AVR32 || SUPERH || BLACKFIN || MN10300) || \ | 809 | AVR32 || SUPERH || BLACKFIN || MN10300) || \ |
810 | ARCH_WANT_FRAME_POINTERS | 810 | ARCH_WANT_FRAME_POINTERS |
811 | default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS | 811 | default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS |
diff --git a/lib/list_debug.c b/lib/list_debug.c index 344c710d16ca..b8029a5583ff 100644 --- a/lib/list_debug.c +++ b/lib/list_debug.c | |||
@@ -35,6 +35,31 @@ void __list_add(struct list_head *new, | |||
35 | } | 35 | } |
36 | EXPORT_SYMBOL(__list_add); | 36 | EXPORT_SYMBOL(__list_add); |
37 | 37 | ||
38 | void __list_del_entry(struct list_head *entry) | ||
39 | { | ||
40 | struct list_head *prev, *next; | ||
41 | |||
42 | prev = entry->prev; | ||
43 | next = entry->next; | ||
44 | |||
45 | if (WARN(next == LIST_POISON1, | ||
46 | "list_del corruption, %p->next is LIST_POISON1 (%p)\n", | ||
47 | entry, LIST_POISON1) || | ||
48 | WARN(prev == LIST_POISON2, | ||
49 | "list_del corruption, %p->prev is LIST_POISON2 (%p)\n", | ||
50 | entry, LIST_POISON2) || | ||
51 | WARN(prev->next != entry, | ||
52 | "list_del corruption. prev->next should be %p, " | ||
53 | "but was %p\n", entry, prev->next) || | ||
54 | WARN(next->prev != entry, | ||
55 | "list_del corruption. next->prev should be %p, " | ||
56 | "but was %p\n", entry, next->prev)) | ||
57 | return; | ||
58 | |||
59 | __list_del(prev, next); | ||
60 | } | ||
61 | EXPORT_SYMBOL(__list_del_entry); | ||
62 | |||
38 | /** | 63 | /** |
39 | * list_del - deletes entry from list. | 64 | * list_del - deletes entry from list. |
40 | * @entry: the element to delete from the list. | 65 | * @entry: the element to delete from the list. |
@@ -43,19 +68,7 @@ EXPORT_SYMBOL(__list_add); | |||
43 | */ | 68 | */ |
44 | void list_del(struct list_head *entry) | 69 | void list_del(struct list_head *entry) |
45 | { | 70 | { |
46 | WARN(entry->next == LIST_POISON1, | 71 | __list_del_entry(entry); |
47 | "list_del corruption, next is LIST_POISON1 (%p)\n", | ||
48 | LIST_POISON1); | ||
49 | WARN(entry->next != LIST_POISON1 && entry->prev == LIST_POISON2, | ||
50 | "list_del corruption, prev is LIST_POISON2 (%p)\n", | ||
51 | LIST_POISON2); | ||
52 | WARN(entry->prev->next != entry, | ||
53 | "list_del corruption. prev->next should be %p, " | ||
54 | "but was %p\n", entry, entry->prev->next); | ||
55 | WARN(entry->next->prev != entry, | ||
56 | "list_del corruption. next->prev should be %p, " | ||
57 | "but was %p\n", entry, entry->next->prev); | ||
58 | __list_del(entry->prev, entry->next); | ||
59 | entry->next = LIST_POISON1; | 72 | entry->next = LIST_POISON1; |
60 | entry->prev = LIST_POISON2; | 73 | entry->prev = LIST_POISON2; |
61 | } | 74 | } |
diff --git a/lib/radix-tree.c b/lib/radix-tree.c index 5086bb962b4d..7ea2e033d715 100644 --- a/lib/radix-tree.c +++ b/lib/radix-tree.c | |||
@@ -736,10 +736,11 @@ next: | |||
736 | } | 736 | } |
737 | } | 737 | } |
738 | /* | 738 | /* |
739 | * The iftag must have been set somewhere because otherwise | 739 | * We need not to tag the root tag if there is no tag which is set with |
740 | * we would return immediated at the beginning of the function | 740 | * settag within the range from *first_indexp to last_index. |
741 | */ | 741 | */ |
742 | root_tag_set(root, settag); | 742 | if (tagged > 0) |
743 | root_tag_set(root, settag); | ||
743 | *first_indexp = index; | 744 | *first_indexp = index; |
744 | 745 | ||
745 | return tagged; | 746 | return tagged; |
diff --git a/lib/rbtree.c b/lib/rbtree.c index 4693f79195d3..a16be19a1305 100644 --- a/lib/rbtree.c +++ b/lib/rbtree.c | |||
@@ -315,6 +315,7 @@ void rb_augment_insert(struct rb_node *node, rb_augment_f func, void *data) | |||
315 | 315 | ||
316 | rb_augment_path(node, func, data); | 316 | rb_augment_path(node, func, data); |
317 | } | 317 | } |
318 | EXPORT_SYMBOL(rb_augment_insert); | ||
318 | 319 | ||
319 | /* | 320 | /* |
320 | * before removing the node, find the deepest node on the rebalance path | 321 | * before removing the node, find the deepest node on the rebalance path |
@@ -340,6 +341,7 @@ struct rb_node *rb_augment_erase_begin(struct rb_node *node) | |||
340 | 341 | ||
341 | return deepest; | 342 | return deepest; |
342 | } | 343 | } |
344 | EXPORT_SYMBOL(rb_augment_erase_begin); | ||
343 | 345 | ||
344 | /* | 346 | /* |
345 | * after removal, update the tree to account for the removed entry | 347 | * after removal, update the tree to account for the removed entry |
@@ -350,6 +352,7 @@ void rb_augment_erase_end(struct rb_node *node, rb_augment_f func, void *data) | |||
350 | if (node) | 352 | if (node) |
351 | rb_augment_path(node, func, data); | 353 | rb_augment_path(node, func, data); |
352 | } | 354 | } |
355 | EXPORT_SYMBOL(rb_augment_erase_end); | ||
353 | 356 | ||
354 | /* | 357 | /* |
355 | * This function returns the first node (in sort order) of the tree. | 358 | * This function returns the first node (in sort order) of the tree. |