Re: [PATCH 4/7] xfs: pass a xfs_efd_log_item to xfs_efd_item_sizeof

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 19, 2021 at 10:28:01AM +0200, Christoph Hellwig wrote:
> xfs_efd_log_item only looks at the embedded xfs_efd_log_item structure,
> so pass that directly and rename the function to xfs_efd_log_item_sizeof.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> ---
>  fs/xfs/xfs_extfree_item.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/fs/xfs/xfs_extfree_item.c b/fs/xfs/xfs_extfree_item.c
> index 7ae570d1944590..f15d6cfca6e2f1 100644
> --- a/fs/xfs/xfs_extfree_item.c
> +++ b/fs/xfs/xfs_extfree_item.c
> @@ -195,11 +195,11 @@ xfs_efd_item_free(struct xfs_efd_log_item *efdp)
>   * structure.
>   */
>  static inline int
> -xfs_efd_item_sizeof(
> -	struct xfs_efd_log_item *efdp)
> +xfs_efd_log_item_sizeof(

Same naming complaint as the last patch, though the code changes
themselves look fine to me.

--D

> +	struct xfs_efd_log_format *elf)
>  {
>  	return sizeof(struct xfs_efd_log_format) +
> -	       (efdp->efd_format.efd_nextents - 1) * sizeof(struct xfs_extent);
> +	       (elf->efd_nextents - 1) * sizeof(struct xfs_extent);
>  }
>  
>  STATIC void
> @@ -209,7 +209,7 @@ xfs_efd_item_size(
>  	int			*nbytes)
>  {
>  	*nvecs += 1;
> -	*nbytes += xfs_efd_item_sizeof(EFD_ITEM(lip));
> +	*nbytes += xfs_efd_log_item_sizeof(&EFD_ITEM(lip)->efd_format);
>  }
>  
>  /*
> @@ -234,7 +234,7 @@ xfs_efd_item_format(
>  
>  	xlog_copy_iovec(lv, &vecp, XLOG_REG_TYPE_EFD_FORMAT,
>  			&efdp->efd_format,
> -			xfs_efd_item_sizeof(efdp));
> +			xfs_efd_log_item_sizeof(&efdp->efd_format));
>  }
>  
>  /*
> -- 
> 2.30.1
> 



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux