diff options
| author | Baolin Liu <liubaolin@kylinos.cn> | 2025-11-11 20:05:58 +0800 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2025-11-24 22:42:22 +0100 |
| commit | 9b3743a6760bedc783809b94aa87b9b8ef64f52b (patch) | |
| tree | de2d9efa2efa6dc679a31127ff88a8a28112bfcf /fs/btrfs/compression.c | |
| parent | 07166122b58a7fb3c056247aa262e832f3f38d0f (diff) | |
btrfs: simplify list initialization in btrfs_compr_pool_scan()
In btrfs_compr_pool_scan(), use LIST_HEAD() to declare and initialize
the 'remove' list_head in one step instead of using INIT_LIST_HEAD()
separately.
Signed-off-by: Baolin Liu <liubaolin@kylinos.cn>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/compression.c')
| -rw-r--r-- | fs/btrfs/compression.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index cdb5c891b0ac..241a117ad7cc 100644 --- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.c @@ -192,15 +192,13 @@ static unsigned long btrfs_compr_pool_count(struct shrinker *sh, struct shrink_c static unsigned long btrfs_compr_pool_scan(struct shrinker *sh, struct shrink_control *sc) { - struct list_head remove; + LIST_HEAD(remove); struct list_head *tmp, *next; int freed; if (compr_pool.count == 0) return SHRINK_STOP; - INIT_LIST_HEAD(&remove); - /* For now, just simply drain the whole list. */ spin_lock(&compr_pool.lock); list_splice_init(&compr_pool.list, &remove); |