* [PATCH -next] fs: use LIST_HEAD() to simplify code
@ 2024-08-21 6:54 Hongbo Li
2024-08-28 9:28 ` Jan Kara
2024-08-28 11:20 ` Christian Brauner
0 siblings, 2 replies; 3+ messages in thread
From: Hongbo Li @ 2024-08-21 6:54 UTC (permalink / raw)
To: viro, brauner, jack; +Cc: lihongbo22, linux-fsdevel
list_head can be initialized automatically with LIST_HEAD()
instead of calling INIT_LIST_HEAD().
Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] fs: use LIST_HEAD() to simplify code
2024-08-21 6:54 [PATCH -next] fs: use LIST_HEAD() to simplify code Hongbo Li
@ 2024-08-28 9:28 ` Jan Kara
2024-08-28 11:20 ` Christian Brauner
1 sibling, 0 replies; 3+ messages in thread
From: Jan Kara @ 2024-08-28 9:28 UTC (permalink / raw)
To: Hongbo Li; +Cc: viro, brauner, jack, linux-fsdevel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] fs: use LIST_HEAD() to simplify code
2024-08-21 6:54 [PATCH -next] fs: use LIST_HEAD() to simplify code Hongbo Li
2024-08-28 9:28 ` Jan Kara
@ 2024-08-28 11:20 ` Christian Brauner
1 sibling, 0 replies; 3+ messages in thread
From: Christian Brauner @ 2024-08-28 11:20 UTC (permalink / raw)
To: Hongbo Li; +Cc: Christian Brauner, linux-fsdevel, viro, jack
On Wed, 21 Aug 2024 14:54:56 +0800, Hongbo Li wrote:
> list_head can be initialized automatically with LIST_HEAD()
> instead of calling INIT_LIST_HEAD().
>
>
Applied to the vfs.misc branch of the vfs/vfs.git tree.
Patches in the vfs.misc branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.misc
[1/1] fs: use LIST_HEAD() to simplify code
https://git.kernel.org/vfs/vfs/c/c594d308f43f
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-08-28 11:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-21 6:54 [PATCH -next] fs: use LIST_HEAD() to simplify code Hongbo Li
2024-08-28 9:28 ` Jan Kara
2024-08-28 11:20 ` Christian Brauner
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).