mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 12:11:40 +00:00
swap: cleanup duplicated WARN_ON in add_to_avail_list
Patch series "fix WARN_ON in add_to_avail_list". Empty check for plist_node is checked in add_to_avail_list and plist_add. Drop the duplicate one in add_to_avail_list. Link: https://lkml.kernel.org/r/20230627120833.2230766-1-mawupeng1@huawei.com Link: https://lkml.kernel.org/r/20230627120833.2230766-2-mawupeng1@huawei.com Signed-off-by: Ma Wupeng <mawupeng1@huawei.com> Cc: Hugh Dickins <hughd@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
87b11f8622
commit
67490031e8
@ -714,10 +714,8 @@ static void add_to_avail_list(struct swap_info_struct *p)
|
||||
int nid;
|
||||
|
||||
spin_lock(&swap_avail_lock);
|
||||
for_each_node(nid) {
|
||||
WARN_ON(!plist_node_empty(&p->avail_lists[nid]));
|
||||
for_each_node(nid)
|
||||
plist_add(&p->avail_lists[nid], &swap_avail_heads[nid]);
|
||||
}
|
||||
spin_unlock(&swap_avail_lock);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user