Commit 6adf4b11 authored by Baolin Liu's avatar Baolin Liu Committed by Vlastimil Babka
Browse files

mm: simplify list initialization in barn_shrink()



In barn_shrink(), use LIST_HEAD() to declare and initialize the
list_head in one step instead of using INIT_LIST_HEAD() separately.

No functional change.

Signed-off-by: default avatarBaolin Liu <liubaolin@kylinos.cn>
Reviewed-by: default avatarHarry Yoo <harry.yoo@oracle.com>
Signed-off-by: default avatarVlastimil Babka <vbabka@suse.cz>
parent 4c0a17e2
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -3032,14 +3032,11 @@ static void barn_init(struct node_barn *barn)

static void barn_shrink(struct kmem_cache *s, struct node_barn *barn)
{
	struct list_head empty_list;
	struct list_head full_list;
	LIST_HEAD(empty_list);
	LIST_HEAD(full_list);
	struct slab_sheaf *sheaf, *sheaf2;
	unsigned long flags;

	INIT_LIST_HEAD(&empty_list);
	INIT_LIST_HEAD(&full_list);

	spin_lock_irqsave(&barn->lock, flags);

	list_splice_init(&barn->sheaves_full, &full_list);