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 <[email protected]>
Acked-by: Dave Airlie <[email protected]>
Acked-by: Artem Bityutskiy <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Dave Chinner 2010-01-12 17:39:16 +11:00 • committed by Linus Torvalds
commit 2c761270d5
5 changed files with 119 additions and 182 deletions

View file

@ -21,7 +21,7 @@ lib-y += kobject.o kref.o klist.o
obj-y += bcd.o div64.o sort.o parser.o halfmd4.o debug_locks.o random32.o \
bust_spinlocks.o hexdump.o kasprintf.o bitmap.o scatterlist.o \
string_helpers.o gcd.o
string_helpers.o gcd.o list_sort.o
ifeq ($(CONFIG_DEBUG_KOBJECT),y)
CFLAGS_kobject.o += -DDEBUG