Commit 380b5dc0 authored by Nathan Scott's avatar Nathan Scott

[XFS] Fix up an internal sort function name collision issue.

SGI-PV: 942986
SGI-Modid: xfs-linux:xfs-kern:23859a
Signed-off-by: default avatarNathan Scott <nathans@sgi.com>
parent 80cce779
...@@ -254,11 +254,11 @@ static inline void set_buffer_unwritten_io(struct buffer_head *bh) ...@@ -254,11 +254,11 @@ static inline void set_buffer_unwritten_io(struct buffer_head *bh)
#define MAX(a,b) (max(a,b)) #define MAX(a,b) (max(a,b))
#define howmany(x, y) (((x)+((y)-1))/(y)) #define howmany(x, y) (((x)+((y)-1))/(y))
#define roundup(x, y) ((((x)+((y)-1))/(y))*(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 * 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_stack_trace() dump_stack()
#define xfs_itruncate_data(ip, off) \ #define xfs_itruncate_data(ip, off) \
(-vmtruncate(LINVFS_GET_IP(XFS_ITOV(ip)), (off))) (-vmtruncate(LINVFS_GET_IP(XFS_ITOV(ip)), (off)))
......
...@@ -155,7 +155,7 @@ posix_acl_xattr_to_xfs( ...@@ -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. * Primary key is ae_tag, secondary key is ae_id.
*/ */
STATIC int STATIC int
...@@ -189,7 +189,7 @@ posix_acl_xfs_to_xattr( ...@@ -189,7 +189,7 @@ posix_acl_xfs_to_xattr(
return -ERANGE; return -ERANGE;
/* Need to sort src XFS ACL by <ae_tag,ae_id> */ /* Need to sort src XFS ACL by <ae_tag,ae_id> */
qsort(src->acl_entry, src->acl_cnt, sizeof(src->acl_entry[0]), xfs_sort(src->acl_entry, src->acl_cnt, sizeof(src->acl_entry[0]),
xfs_acl_entry_compare); xfs_acl_entry_compare);
dest->a_version = cpu_to_le32(POSIX_ACL_XATTR_VERSION); dest->a_version = cpu_to_le32(POSIX_ACL_XATTR_VERSION);
......
...@@ -670,7 +670,7 @@ xfs_attr_shortform_list(xfs_attr_list_context_t *context) ...@@ -670,7 +670,7 @@ xfs_attr_shortform_list(xfs_attr_list_context_t *context)
/* /*
* Sort the entries on hash then entno. * 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. * Re-find our place IN THE SORTED LIST.
......
...@@ -1234,7 +1234,7 @@ xfs_dir2_sf_to_block( ...@@ -1234,7 +1234,7 @@ xfs_dir2_sf_to_block(
/* /*
* Sort the leaf entries by hash value. * 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. * Log the leaf entry area and tail.
* Already logged the header in data_init, ignore needlog. * Already logged the header in data_init, ignore needlog.
......
...@@ -508,7 +508,7 @@ xfs_dir_shortform_getdents(xfs_inode_t *dp, uio_t *uio, int *eofp, ...@@ -508,7 +508,7 @@ xfs_dir_shortform_getdents(xfs_inode_t *dp, uio_t *uio, int *eofp,
/* /*
* Sort the entries on hash then entno. * 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. * Stuff in last entry.
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment