Re: [PATCH -next] xfs: use LIST_HEAD() to simplify code

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

 



On Wed, Aug 21, 2024 at 02:43:55PM +0800, Hongbo Li wrote:
> list_head can be initialized automatically with LIST_HEAD()
> instead of calling INIT_LIST_HEAD().
> 
> Signed-off-by: Hongbo Li <lihongbo22@xxxxxxxxxx>

Looks ok,
Reviewed-by: Darrick J. Wong <djwong@xxxxxxxxxx>

--D

> ---
>  fs/xfs/xfs_mru_cache.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/xfs/xfs_mru_cache.c b/fs/xfs/xfs_mru_cache.c
> index 7443debaffd6..d0f5b403bdbe 100644
> --- a/fs/xfs/xfs_mru_cache.c
> +++ b/fs/xfs/xfs_mru_cache.c
> @@ -230,9 +230,8 @@ _xfs_mru_cache_clear_reap_list(
>  		__releases(mru->lock) __acquires(mru->lock)
>  {
>  	struct xfs_mru_cache_elem *elem, *next;
> -	struct list_head	tmp;
> +	LIST_HEAD(tmp);
>  
> -	INIT_LIST_HEAD(&tmp);
>  	list_for_each_entry_safe(elem, next, &mru->reap_list, list_node) {
>  
>  		/* Remove the element from the data store. */
> -- 
> 2.34.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