summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDave Chinner <david@fromorbit.com>2010-01-12 17:39:16 +1100
committerLinus Torvalds <torvalds@linux-foundation.org>2010-01-12 21:02:00 -0800
commit2c761270d5520dd84ab0b4e47c24d99ff8503c38 (patch)
treec23a51fdcc96641661b632d3b3c2c46ad7e53a91 /include
parentdbf004d7883b3adb058c0c1a5635bc4ec27651c0 (diff)
downloadlinux-3.10-2c761270d5520dd84ab0b4e47c24d99ff8503c38.tar.gz
linux-3.10-2c761270d5520dd84ab0b4e47c24d99ff8503c38.tar.bz2
linux-3.10-2c761270d5520dd84ab0b4e47c24d99ff8503c38.zip
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 00000000000..1a2df2efb77
--- /dev/null
+++ b/include/linux/list_sort.h
@@ -0,0 +1,11 @@
+#ifndef _LINUX_LIST_SORT_H
+#define _LINUX_LIST_SORT_H
+
+#include <linux/types.h>
+
+struct list_head;
+
+void list_sort(void *priv, struct list_head *head,
+ int (*cmp)(void *priv, struct list_head *a,
+ struct list_head *b));
+#endif