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); 
posix_acl_xfs_to_xattr(	xfs_acl_t		*src,	posix_acl_xattr_header	*dest,	size_t			size){	int			n;	size_t			new_size = posix_acl_xattr_size(src->acl_cnt);	posix_acl_xattr_entry	*dest_entry;	xfs_acl_entry_t		*src_entry;	if (size < new_size)		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);	dest->a_version = cpu_to_le32(POSIX_ACL_XATTR_VERSION);	dest_entry = &dest->a_entries[0];	src_entry = &src->acl_entry[0];	for (n = 0; n < src->acl_cnt; n++, dest_entry++, src_entry++) {		dest_entry->e_perm = cpu_to_le16(src_entry->ae_perm);		if (_ACL_PERM_INVALID(src_entry->ae_perm))			return -EINVAL;		dest_entry->e_tag  = cpu_to_le16(src_entry->ae_tag);		switch (src_entry->ae_tag) {		case ACL_USER:		case ACL_GROUP:			dest_entry->e_id = cpu_to_le32(src_entry->ae_id);				break;		case ACL_USER_OBJ:		case ACL_GROUP_OBJ:		case ACL_MASK:		case ACL_OTHER:			dest_entry->e_id = cpu_to_le32(ACL_UNDEFINED_ID);			break;		default:			return -EINVAL;		}	}	return new_size;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/380b5dc0e59340e7ed36dcc95dd1022aca75bbe2/xfs_acl.c/buggy/fs/xfs/xfs_acl.c