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

Jan Kara <[email protected]> Wed, 28 Aug 2024 11:29:53 +0200
Newsgroups gmane.comp.file-systems.reiserfs.general
Message-ID <20240828092953.v6c54nig3xosb5gm@quack3>
On Wed 21-08-24 14:51:36, Hongbo Li wrote:
> list_head can be initialized automatically with LIST_HEAD()
> instead of calling INIT_LIST_HEAD().
> 
> Signed-off-by: Hongbo Li <[email protected]>

For reiserfs this cleanup is pointless. That code is scheduled to be
deleted in three months.

								Honza

> ---
>  fs/reiserfs/journal.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c
> index e477ee0ff35d..606b363196aa 100644
> --- a/fs/reiserfs/journal.c
> +++ b/fs/reiserfs/journal.c
> @@ -795,8 +795,7 @@ static int write_ordered_buffers(spinlock_t * lock,
>  	struct reiserfs_jh *jh;
>  	int ret = j->j_errno;
>  	struct buffer_chunk chunk;
> -	struct list_head tmp;
> -	INIT_LIST_HEAD(&tmp);
> +	LIST_HEAD(tmp);
>  
>  	chunk.nr = 0;
>  	spin_lock(lock);
> -- 
> 2.34.1
> 
-- 
Jan Kara <[email protected]>
SUSE Labs, CR