diff options
author | Ruan Jinjie <ruanjinjie@huawei.com> | 2023-08-10 06:00:22 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2023-08-21 15:54:46 +0300 |
commit | 84af994b85b89ae405b8ea930653543bc5b864d3 (patch) | |
tree | 31e462d652433af7046ba2d284c1da90ab4d5ff7 /fs/btrfs/file.c | |
parent | 257614301a5db9f7b0548584ca207ad7785c8b89 (diff) | |
download | linux-84af994b85b89ae405b8ea930653543bc5b864d3.tar.xz |
btrfs: use LIST_HEAD() to initialize the list_head
Use LIST_HEAD() to initialize the list_head instead of open-coding it.
Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r-- | fs/btrfs/file.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index fd03e689a6be..6edad7b9a5d3 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -3018,7 +3018,7 @@ static long btrfs_fallocate(struct file *file, int mode, struct extent_changeset *data_reserved = NULL; struct falloc_range *range; struct falloc_range *tmp; - struct list_head reserve_list; + LIST_HEAD(reserve_list); u64 cur_offset; u64 last_byte; u64 alloc_start; @@ -3110,7 +3110,6 @@ static long btrfs_fallocate(struct file *file, int mode, btrfs_assert_inode_range_clean(BTRFS_I(inode), alloc_start, locked_end); /* First, check if we exceed the qgroup limit */ - INIT_LIST_HEAD(&reserve_list); while (cur_offset < alloc_end) { em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, cur_offset, alloc_end - cur_offset); |