Re: [PATCH 2/8] xfs: list entry elements don't need to be initialized

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

 



On Wed, Jun 16, 2021 at 06:32:06PM +0200, Christoph Hellwig wrote:
> list_add does not require the added element to be initialized.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> ---

Reviewed-by: Brian Foster <bfoster@xxxxxxxxxx>

>  fs/xfs/xfs_log.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
> index 8999c78f3ac6d9..32cb0fc459a364 100644
> --- a/fs/xfs/xfs_log.c
> +++ b/fs/xfs/xfs_log.c
> @@ -851,7 +851,7 @@ xlog_write_unmount_record(
>  		.lv_iovecp = &reg,
>  	};
>  	LIST_HEAD(lv_chain);
> -	INIT_LIST_HEAD(&vec.lv_list);
> +
>  	list_add(&vec.lv_list, &lv_chain);
>  
>  	BUILD_BUG_ON((sizeof(struct xlog_op_header) +
> @@ -1587,7 +1587,7 @@ xlog_commit_record(
>  	};
>  	int	error;
>  	LIST_HEAD(lv_chain);
> -	INIT_LIST_HEAD(&vec.lv_list);
> +
>  	list_add(&vec.lv_list, &lv_chain);
>  
>  	if (XLOG_FORCED_SHUTDOWN(log))
> -- 
> 2.30.2
> 




[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