
From: Matt Mackall <mpm@selenic.com>

Switch NFS ACLs to lib/sort

Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/fs/nfsacl.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff -puN fs/nfsacl.c~lib-sort-replace-qsort-in-nfs-acl-code fs/nfsacl.c
--- 25/fs/nfsacl.c~lib-sort-replace-qsort-in-nfs-acl-code	2005-02-02 19:49:55.313095712 -0800
+++ 25-akpm/fs/nfsacl.c	2005-02-02 19:49:55.317095104 -0800
@@ -25,6 +25,7 @@
 #include <linux/sunrpc/xdr.h>
 #include <linux/nfsacl.h>
 #include <linux/nfs3.h>
+#include <linux/sort.h>
 
 MODULE_LICENSE("GPL");
 
@@ -163,9 +164,10 @@ xdr_nfsace_decode(struct xdr_array2_desc
 	return 0;
 }
 
-static int
-cmp_acl_entry(const struct posix_acl_entry *a, const struct posix_acl_entry *b)
+static int cmp_acl_entry(const void *x, const void *y)
 {
+	const struct posix_acl_entry *a = x, *b = y;
+
 	if (a->e_tag != b->e_tag)
 		return a->e_tag - b->e_tag;
 	else if (a->e_id > b->e_id)
@@ -188,8 +190,8 @@ posix_acl_from_nfsacl(struct posix_acl *
 	if (!acl)
 		return 0;
 
-	qsort(acl->a_entries, acl->a_count, sizeof(struct posix_acl_entry),
-	      (int(*)(const void *,const void *))cmp_acl_entry);
+	sort(acl->a_entries, acl->a_count, sizeof(struct posix_acl_entry),
+	     cmp_acl_entry, NULL);
 
 	/* Clear undefined identifier fields and find the ACL_GROUP_OBJ
 	   and ACL_MASK entries. */
_
