Skip to content

Commit c594d30

Browse files
Hongbo Librauner
authored andcommitted
fs: use LIST_HEAD() to simplify code
list_head can be initialized automatically with LIST_HEAD() instead of calling INIT_LIST_HEAD(). Signed-off-by: Hongbo Li <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Jan Kara <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
1 parent 3f59876 commit c594d30

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fs/buffer.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -774,12 +774,11 @@ EXPORT_SYMBOL(block_dirty_folio);
774774
static int fsync_buffers_list(spinlock_t *lock, struct list_head *list)
775775
{
776776
struct buffer_head *bh;
777-
struct list_head tmp;
778777
struct address_space *mapping;
779778
int err = 0, err2;
780779
struct blk_plug plug;
780+
LIST_HEAD(tmp);
781781

782-
INIT_LIST_HEAD(&tmp);
783782
blk_start_plug(&plug);
784783

785784
spin_lock(lock);

0 commit comments

Comments
 (0)