]> git.baikalelectronics.ru Git - kernel.git/commit
rbtree: add rbtree_postorder_for_each_entry_safe() helper
authorCody P Schafer <cody@linux.vnet.ibm.com>
Wed, 11 Sep 2013 21:25:11 +0000 (14:25 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 11 Sep 2013 22:59:20 +0000 (15:59 -0700)
commit8709344b7133ef73bfd22fced8c4e27c255d6ecb
treefffde388176946c7de6eaddd4e7bdd2b7ea27ffd
parentdeec04f0a61ac0b93a0e02b4878d413bdf385dc9
rbtree: add rbtree_postorder_for_each_entry_safe() helper

Because deletion (of the entire tree) is a relatively common use of the
rbtree_postorder iteration, and because doing it safely means fiddling
with temporary storage, provide a helper to simplify postorder rbtree
iteration.

Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
Reviewed-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Cc: David Woodhouse <David.Woodhouse@intel.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Michel Lespinasse <walken@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/rbtree.h