diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-01-11 17:55:15 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-01-11 17:55:15 -0500 |
commit | c727b4c63c9bf33c65351bbcc738161edb444b24 (patch) | |
tree | 2e9f3d6cfa17f2fc62a64dbb41fff9e6baabfd24 /lib/rbtree.c | |
parent | 93ccb3910ae3dbff6d224aecd22d8eece3d70ce9 (diff) | |
parent | 3cb7a56344ca45ee56d71c5f8fe9f922306bff1f (diff) |
Merge branch 'akpm' (incoming fixes from Andrew)
Merge misc fixes from Andrew Morton:
"The audit fixes have been floating around for a while - Al and Eric
aren't responding to either myself or Kees so I asked Kees to
re-review them and here they are."
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (22 commits)
lib/rbtree.c: avoid the use of non-static __always_inline
MAINTAINERS: Omar had moved
mm: compaction: partially revert capture of suitable high-order page
linux/audit.h: move ptrace.h include to kernel header
kernel/audit.c: avoid negative sleep durations
audit: catch possible NULL audit buffers
audit: create explicit AUDIT_SECCOMP event type
MAINTAINERS: fix a status pattern
MAINTAINERS: fix arch/arm/plat-omap/include/plat/omap_hwmod.h
mm: thp: acquire the anon_vma rwsem for write during split
mm: mmap: annotate vm_lock_anon_vma locking properly for lockdep
lockdep, rwsem: provide down_write_nest_lock()
arch/mn10300/Kconfig: select CONFIG_GENERIC_ATOMIC64
mm: bootmem: fix free_all_bootmem_core() with odd bitmap alignment
mm: use aligned zone start for pfn_to_bitidx calculation
fs/exec.c: work around icc miscompilation
mm: compaction: fix echo 1 > compact_memory return error issue
mm: memblock: fix wrong memmove size in memblock_merge_regions()
drivers/video/ssd1307fb.c: fix bit order bug in the byte translation function
mm: migrate: check page_count of THP before migrating
...
Diffstat (limited to 'lib/rbtree.c')
-rw-r--r-- | lib/rbtree.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/lib/rbtree.c b/lib/rbtree.c index 4f56a11d67fa..c0e31fe2fabf 100644 --- a/lib/rbtree.c +++ b/lib/rbtree.c | |||
@@ -194,8 +194,12 @@ __rb_insert(struct rb_node *node, struct rb_root *root, | |||
194 | } | 194 | } |
195 | } | 195 | } |
196 | 196 | ||
197 | __always_inline void | 197 | /* |
198 | __rb_erase_color(struct rb_node *parent, struct rb_root *root, | 198 | * Inline version for rb_erase() use - we want to be able to inline |
199 | * and eliminate the dummy_rotate callback there | ||
200 | */ | ||
201 | static __always_inline void | ||
202 | ____rb_erase_color(struct rb_node *parent, struct rb_root *root, | ||
199 | void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) | 203 | void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) |
200 | { | 204 | { |
201 | struct rb_node *node = NULL, *sibling, *tmp1, *tmp2; | 205 | struct rb_node *node = NULL, *sibling, *tmp1, *tmp2; |
@@ -355,6 +359,13 @@ __rb_erase_color(struct rb_node *parent, struct rb_root *root, | |||
355 | } | 359 | } |
356 | } | 360 | } |
357 | } | 361 | } |
362 | |||
363 | /* Non-inline version for rb_erase_augmented() use */ | ||
364 | void __rb_erase_color(struct rb_node *parent, struct rb_root *root, | ||
365 | void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) | ||
366 | { | ||
367 | ____rb_erase_color(parent, root, augment_rotate); | ||
368 | } | ||
358 | EXPORT_SYMBOL(__rb_erase_color); | 369 | EXPORT_SYMBOL(__rb_erase_color); |
359 | 370 | ||
360 | /* | 371 | /* |
@@ -380,7 +391,10 @@ EXPORT_SYMBOL(rb_insert_color); | |||
380 | 391 | ||
381 | void rb_erase(struct rb_node *node, struct rb_root *root) | 392 | void rb_erase(struct rb_node *node, struct rb_root *root) |
382 | { | 393 | { |
383 | rb_erase_augmented(node, root, &dummy_callbacks); | 394 | struct rb_node *rebalance; |
395 | rebalance = __rb_erase_augmented(node, root, &dummy_callbacks); | ||
396 | if (rebalance) | ||
397 | ____rb_erase_color(rebalance, root, dummy_rotate); | ||
384 | } | 398 | } |
385 | EXPORT_SYMBOL(rb_erase); | 399 | EXPORT_SYMBOL(rb_erase); |
386 | 400 | ||