Skip to content

Commit

Permalink
fs: use LIST_HEAD() to simplify code
Browse files Browse the repository at this point in the history
list_head can be initialized automatically with LIST_HEAD()
instead of calling INIT_LIST_HEAD().

Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
Link: https://lore.kernel.org/r/20240821065456.2294216-1-lihongbo22@huawei.com
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
  • Loading branch information
Hongbo Li authored and brauner committed Aug 30, 2024
1 parent 41b7343 commit 73ce1c9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 73ce1c9

Please sign in to comment.