# LB_EXT_FREE_BLOCKS_WITH_BUFFER_HEAD
#
# 2.6.32-rc7 ext4_free_blocks requires struct buffer_head
+# Note that RHEL6 is pre 2.6.32-rc7 so this check is still needed.
#
AC_DEFUN([LB_EXT_FREE_BLOCKS_WITH_BUFFER_HEAD], [
LB_CHECK_COMPILE([if 'ext4_free_blocks' needs 'struct buffer_head'],
* but otherwise we'd need to call it every free() */
ldiskfs_discard_preallocations(inode);
#ifdef HAVE_EXT_FREE_BLOCK_WITH_BUFFER_HEAD /* Introduced in 2.6.32-rc7 */
- ldiskfs_free_blocks(handle, inode, NULL, ldiskfs_ext_pblock(&nex),
- cpu_to_le16(nex.ee_len), 0);
+ ldiskfs_free_blocks(handle, inode, NULL,
+ ldiskfs_ext_pblock(&nex),
+ le16_to_cpu(nex.ee_len), 0);
#else
ldiskfs_free_blocks(handle, inode, ldiskfs_ext_pblock(&nex),
- cpu_to_le16(nex.ee_len), 0);
+ le16_to_cpu(nex.ee_len), 0);
#endif
goto out;
}