From: Jan Kara <jack@suse.cz>
To: Hongbo Li <lihongbo22@huawei.com>
Cc: viro@zeniv.linux.org.uk, brauner@kernel.org, jack@suse.cz,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH -next] fs: use LIST_HEAD() to simplify code
Date: Wed, 28 Aug 2024 11:28:56 +0200 [thread overview]
Message-ID: <20240828092856.2gyeootlfcyxwlbo@quack3> (raw)
In-Reply-To: <20240821065456.2294216-1-lihongbo22@huawei.com>
On Wed 21-08-24 14:54:56, Hongbo Li wrote:
> list_head can be initialized automatically with LIST_HEAD()
> instead of calling INIT_LIST_HEAD().
>
> Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
Looks good. Feel free to add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
> ---
> fs/buffer.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/fs/buffer.c b/fs/buffer.c
> index e55ad471c530..31a9062cad7e 100644
> --- a/fs/buffer.c
> +++ b/fs/buffer.c
> @@ -774,12 +774,11 @@ EXPORT_SYMBOL(block_dirty_folio);
> static int fsync_buffers_list(spinlock_t *lock, struct list_head *list)
> {
> struct buffer_head *bh;
> - struct list_head tmp;
> struct address_space *mapping;
> int err = 0, err2;
> struct blk_plug plug;
> + LIST_HEAD(tmp);
>
> - INIT_LIST_HEAD(&tmp);
> blk_start_plug(&plug);
>
> spin_lock(lock);
> --
> 2.34.1
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
next prev parent reply other threads:[~2024-08-28 9:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-21 6:54 [PATCH -next] fs: use LIST_HEAD() to simplify code Hongbo Li
2024-08-28 9:28 ` Jan Kara [this message]
2024-08-28 11:20 ` Christian Brauner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240828092856.2gyeootlfcyxwlbo@quack3 \
--to=jack@suse.cz \
--cc=brauner@kernel.org \
--cc=lihongbo22@huawei.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).