[XFS] Fix up an internal sort function name collision issue.
authorNathan Scott <nathans@sgi.com>
Wed, 2 Nov 2005 00:43:18 +0000 (11:43 +1100)
committerNathan Scott <nathans@sgi.com>
Wed, 2 Nov 2005 00:43:18 +0000 (11:43 +1100)
SGI-PV: 942986
SGI-Modid: xfs-linux:xfs-kern:23859a

Signed-off-by: Nathan Scott <nathans@sgi.com>
fs/xfs/linux-2.6/xfs_linux.h
fs/xfs/xfs_acl.c
fs/xfs/xfs_attr_leaf.c
fs/xfs/xfs_dir2_block.c
fs/xfs/xfs_dir_leaf.c

index 68c5d885ed9c214e737975a3d8a37379f8dbf834..960a626dd1e312826b189e5d7e0316c2984510d2 100644 (file)
@@ -254,11 +254,11 @@ static inline void set_buffer_unwritten_io(struct buffer_head *bh)
 #define MAX(a,b)       (max(a,b))
 #define howmany(x, y)  (((x)+((y)-1))/(y))
 #define roundup(x, y)  ((((x)+((y)-1))/(y))*(y))
-#define qsort(a,n,s,fn)        sort(a,n,s,fn,NULL)
 
 /*
  * Various platform dependent calls that don't fit anywhere else
  */
+#define xfs_sort(a,n,s,fn)     sort(a,n,s,fn,NULL)
 #define xfs_stack_trace()      dump_stack()
 #define xfs_itruncate_data(ip, off)    \
        (-vmtruncate(LINVFS_GET_IP(XFS_ITOV(ip)), (off)))
index 92fd1d67f878f4fc0c3ed2a8b75a9ff65a3ba7a5..49fdc392fc8a3c4256d0403f5b55472f7426aca3 100644 (file)
@@ -155,7 +155,7 @@ posix_acl_xattr_to_xfs(
 }
 
 /*
- * Comparison function called from qsort().
+ * Comparison function called from xfs_sort().
  * Primary key is ae_tag, secondary key is ae_id.
  */
 STATIC int
@@ -189,8 +189,8 @@ posix_acl_xfs_to_xattr(
                return -ERANGE;
 
        /* Need to sort src XFS ACL by <ae_tag,ae_id> */
-       qsort(src->acl_entry, src->acl_cnt, sizeof(src->acl_entry[0]),
-               xfs_acl_entry_compare);
+       xfs_sort(src->acl_entry, src->acl_cnt, sizeof(src->acl_entry[0]),
+                xfs_acl_entry_compare);
 
        dest->a_version = cpu_to_le32(POSIX_ACL_XATTR_VERSION);
        dest_entry = &dest->a_entries[0];
index 50598b121683e09e5321768dd0152d48520fe4ef..63c473f8d6db9f35abfa69d2ed008b13328670dd 100644 (file)
@@ -670,7 +670,7 @@ xfs_attr_shortform_list(xfs_attr_list_context_t *context)
        /*
         * Sort the entries on hash then entno.
         */
-       qsort(sbuf, nsbuf, sizeof(*sbuf), xfs_attr_shortform_compare);
+       xfs_sort(sbuf, nsbuf, sizeof(*sbuf), xfs_attr_shortform_compare);
 
        /*
         * Re-find our place IN THE SORTED LIST.
index bc4c40fcd479a3617f243484b639db8d7a3ffe00..088d3bdfac980699f473f11717bc3de3192ee3bc 100644 (file)
@@ -1234,7 +1234,7 @@ xfs_dir2_sf_to_block(
        /*
         * Sort the leaf entries by hash value.
         */
-       qsort(blp, INT_GET(btp->count, ARCH_CONVERT), sizeof(*blp), xfs_dir2_block_sort);
+       xfs_sort(blp, INT_GET(btp->count, ARCH_CONVERT), sizeof(*blp), xfs_dir2_block_sort);
        /*
         * Log the leaf entry area and tail.
         * Already logged the header in data_init, ignore needlog.
index c2ea6171fb0e3dff5e9afa32c0674a4782df0476..ca9bc2d9ba08a39f4f84ed0407d7ecce5831ee5e 100644 (file)
@@ -508,7 +508,7 @@ xfs_dir_shortform_getdents(xfs_inode_t *dp, uio_t *uio, int *eofp,
        /*
         * Sort the entries on hash then entno.
         */
-       qsort(sbuf, nsbuf, sizeof(*sbuf), xfs_dir_shortform_compare);
+       xfs_sort(sbuf, nsbuf, sizeof(*sbuf), xfs_dir_shortform_compare);
        /*
         * Stuff in last entry.
         */