aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDave Chinner <david@fromorbit.com>2010-01-12 01:39:16 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-01-13 00:02:00 -0500
commit2c761270d5520dd84ab0b4e47c24d99ff8503c38 (patch)
treec23a51fdcc96641661b632d3b3c2c46ad7e53a91 /include
parentdbf004d7883b3adb058c0c1a5635bc4ec27651c0 (diff)
lib: Introduce generic list_sort function
There are two copies of list_sort() in the tree already, one in the DRM code, another in ubifs. Now XFS needs this as well. Create a generic list_sort() function from the ubifs version and convert existing users to it so we don't end up with yet another copy in the tree. Signed-off-by: Dave Chinner <david@fromorbit.com> Acked-by: Dave Airlie <airlied@redhat.com> Acked-by: Artem Bityutskiy <dedekind@infradead.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/list_sort.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/list_sort.h b/include/linux/list_sort.h
new file mode 100644
index 000000000000..1a2df2efb771
--- /dev/null
+++ b/include/linux/list_sort.h
@@ -0,0 +1,11 @@
1#ifndef _LINUX_LIST_SORT_H
2#define _LINUX_LIST_SORT_H
3
4#include <linux/types.h>
5
6struct list_head;
7
8void list_sort(void *priv, struct list_head *head,
9 int (*cmp)(void *priv, struct list_head *a,
10 struct list_head *b));
11#endif