xfs: fix the xfs_log_iovec i_addr type
By making this member a void pointer we can get rid of a lot of pointless casts. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com>
This commit is contained in:

committed by
Alex Elder

parent
898621d5a7
commit
4e0d5f926b
@@ -82,7 +82,7 @@ xfs_efi_item_format(
|
||||
size += (efip->efi_format.efi_nextents - 1) * sizeof(xfs_extent_t);
|
||||
efip->efi_format.efi_size = 1;
|
||||
|
||||
log_vector->i_addr = (xfs_caddr_t)&efip->efi_format;
|
||||
log_vector->i_addr = &efip->efi_format;
|
||||
log_vector->i_len = size;
|
||||
log_vector->i_type = XLOG_REG_TYPE_EFI_FORMAT;
|
||||
ASSERT(size >= sizeof(xfs_efi_log_format_t));
|
||||
@@ -244,7 +244,7 @@ xfs_efi_init(
|
||||
int
|
||||
xfs_efi_copy_format(xfs_log_iovec_t *buf, xfs_efi_log_format_t *dst_efi_fmt)
|
||||
{
|
||||
xfs_efi_log_format_t *src_efi_fmt = (xfs_efi_log_format_t *)buf->i_addr;
|
||||
xfs_efi_log_format_t *src_efi_fmt = buf->i_addr;
|
||||
uint i;
|
||||
uint len = sizeof(xfs_efi_log_format_t) +
|
||||
(src_efi_fmt->efi_nextents - 1) * sizeof(xfs_extent_t);
|
||||
@@ -257,8 +257,7 @@ xfs_efi_copy_format(xfs_log_iovec_t *buf, xfs_efi_log_format_t *dst_efi_fmt)
|
||||
memcpy((char *)dst_efi_fmt, (char*)src_efi_fmt, len);
|
||||
return 0;
|
||||
} else if (buf->i_len == len32) {
|
||||
xfs_efi_log_format_32_t *src_efi_fmt_32 =
|
||||
(xfs_efi_log_format_32_t *)buf->i_addr;
|
||||
xfs_efi_log_format_32_t *src_efi_fmt_32 = buf->i_addr;
|
||||
|
||||
dst_efi_fmt->efi_type = src_efi_fmt_32->efi_type;
|
||||
dst_efi_fmt->efi_size = src_efi_fmt_32->efi_size;
|
||||
@@ -272,8 +271,7 @@ xfs_efi_copy_format(xfs_log_iovec_t *buf, xfs_efi_log_format_t *dst_efi_fmt)
|
||||
}
|
||||
return 0;
|
||||
} else if (buf->i_len == len64) {
|
||||
xfs_efi_log_format_64_t *src_efi_fmt_64 =
|
||||
(xfs_efi_log_format_64_t *)buf->i_addr;
|
||||
xfs_efi_log_format_64_t *src_efi_fmt_64 = buf->i_addr;
|
||||
|
||||
dst_efi_fmt->efi_type = src_efi_fmt_64->efi_type;
|
||||
dst_efi_fmt->efi_size = src_efi_fmt_64->efi_size;
|
||||
@@ -373,7 +371,7 @@ xfs_efd_item_format(
|
||||
size += (efdp->efd_format.efd_nextents - 1) * sizeof(xfs_extent_t);
|
||||
efdp->efd_format.efd_size = 1;
|
||||
|
||||
log_vector->i_addr = (xfs_caddr_t)&efdp->efd_format;
|
||||
log_vector->i_addr = &efdp->efd_format;
|
||||
log_vector->i_len = size;
|
||||
log_vector->i_type = XLOG_REG_TYPE_EFD_FORMAT;
|
||||
ASSERT(size >= sizeof(xfs_efd_log_format_t));
|
||||
|
Reference in New Issue
Block a user