[PATCH v2 4/4] lib: list_sort.c: Limit number of unused cmp callbacks

2014-06-24 Thread Rasmus Villemoes
The helper merge_and_restore_back_links() makes sure to call the caller's cmp function during the final ->prev pointer fixup, so that the cmp function may call cond_resched(). However, if the cmp function does not call cond_resched() at all, this is entirely redundant. If it does, doing at least

[PATCH v2 4/4] lib: list_sort.c: Limit number of unused cmp callbacks

2014-06-24 Thread Rasmus Villemoes
The helper merge_and_restore_back_links() makes sure to call the caller's cmp function during the final -prev pointer fixup, so that the cmp function may call cond_resched(). However, if the cmp function does not call cond_resched() at all, this is entirely redundant. If it does, doing at least