Message ID | 20230627120833.2230766-2-mawupeng1@huawei.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C16F6EB64DC for <linux-mm@archiver.kernel.org>; Tue, 27 Jun 2023 12:08:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 17B328D0003; Tue, 27 Jun 2023 08:08:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 12C0F8D0001; Tue, 27 Jun 2023 08:08:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0196A8D0003; Tue, 27 Jun 2023 08:08:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id E90008D0001 for <linux-mm@kvack.org>; Tue, 27 Jun 2023 08:08:45 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id A9D7C1A092D for <linux-mm@kvack.org>; Tue, 27 Jun 2023 12:08:45 +0000 (UTC) X-FDA: 80948406210.19.013E94F Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf18.hostedemail.com (Postfix) with ESMTP id B85FC1C0009 for <linux-mm@kvack.org>; Tue, 27 Jun 2023 12:08:42 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf18.hostedemail.com: domain of mawupeng1@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=mawupeng1@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1687867723; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JG+MxX5N+LS7YTjk/+01l2Yc0IeaacdIWZ6zRJ97y0A=; b=fQ0AJsLQMVeuO/HYOkmfRW+oIcAiN1pgOH7BpYRbmkgPcB9WkeMIhYtsyB4VRX2ldmtQdG YKhIOA3lp4mpBTed7LdHeGDAf+Ai9ElqF8VbABC9Ifwbm6eWLVBiJqyLFoxo+fRp8v0OU4 52wl0o4Rbb1Q5bDOIbhAAfWQFj2yETc= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf18.hostedemail.com: domain of mawupeng1@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=mawupeng1@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1687867723; a=rsa-sha256; cv=none; b=KZDTAckDvBbtPXdm/co5Jj+54vtL28ra6SluCNd5nNy34p2d/KkrAnVihj6+BKsAU+8jXE dBpD/O7mCjqykklHBAA26KM6z/wdfRJK99hmxVSCEMm+X5FkDzKnAKX506IW9QF0uqE9Nb ubAsJiysfncmrnlZCbc2EPA3T9fE0MY= Received: from dggpemm500014.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Qr3QG5QRCzqV0Q; Tue, 27 Jun 2023 20:08:22 +0800 (CST) Received: from localhost.localdomain (10.175.112.125) by dggpemm500014.china.huawei.com (7.185.36.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Tue, 27 Jun 2023 20:08:38 +0800 From: Wupeng Ma <mawupeng1@huawei.com> To: <akpm@linux-foundation.org> CC: <linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>, <mawupeng1@huawei.com> Subject: [PATCH 1/2] swap: Cleanup duplicated WARN_ON in add_to_avail_list Date: Tue, 27 Jun 2023 20:08:32 +0800 Message-ID: <20230627120833.2230766-2-mawupeng1@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230627120833.2230766-1-mawupeng1@huawei.com> References: <20230627120833.2230766-1-mawupeng1@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemm500014.china.huawei.com (7.185.36.153) X-CFilter-Loop: Reflected X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: B85FC1C0009 X-Stat-Signature: zmuj155pdthjmtd4g6dmxwdght1geq78 X-Rspam-User: X-HE-Tag: 1687867722-364438 X-HE-Meta: U2FsdGVkX1/4x9eSHl9QrG58qJ6Zsflyp0AhTOUbU3PFYtD69s3NfkOzRqHVolHvLmEWwmlyFXeGnYIy2FS0X+t7Xwlh78NFr7zVJ101hi+rXuM6HMwmZYuLDl456FX/cb11q4aEMEbHIy4xl8GJo5tVGA8dlatnqIvXayepJtylzKlQ6X7eM6DmV8OlX/IoiP6i4bgVfb/JU5VWjlX9XHtjqkgu8KTKB1QGMMOgNmD5gXtGhBteaCM3C3enbIKsbzv+1OolXHwSyp625hENGtNK4PfwH3PjiLe6WvJU7pjwERKHGkbftcN9ziPlevlAdPUpId8Fvuogk3N9AEgBGLHXeM/MgQnUx/GyNVpY1RmcwdhikINFWwPACyWNcS1YTv4+qMiniGWswNOPNbSVdxM6zuaBydZO0QuXsYD8hmTWAsqN64F9fcMNvmkAmj1lMY/Ls04Ry/hq0897P22cZeLbls17HtAHm/l2Y3BIqyoY7Lo4Z0Qco9Ekf5Nvjar28MPoxtQ3rplbvikFVYy5d3CsYRdAjrd00BC/+UO3LGh4cXDI5YeNvRQBPjeZSXwaKwbmPfJGs7DDVhnfsPtiziZ1SWpI87SAf4v7nZWUJVBMYLnnTNnE4OcgsHAu8jXYyQZG6DMEsrgS4yoYq5NTsgrYXxvHyIuyJ/EifRfWAaExNneZ+vlRRI6dsmS0Y5Sl1RUvuWWWcczZyZ3VqOfO6tEI72RTnkp7eTF2QsH3NIfRavqw2/yquLO0vCy3Ep94JWRrVd5xWXPtCkNJtALisehsvGNShCx5KsTClTdfWyjttou1JpuRoGyCMGhRNvteSMWlguMaOKwU8qjNtFyugx8nvGMpqngwYyJJBPSfB3ELxvGbp67D2QmUxRpzEgTmvk8oZCD3Psst45mlIF1IJyZT9VIlzHtcG60NgdoiKA752pcF5y4aShaogfxlgHJLNaUGH9t+2078n/ni5yH /xkDGLAb pqfNs8FIcA2WEMdkHZ1CLZjaHCR4TsKxmYXbbheiRApLo1trJTG5IOynEGZFoVA3k5sWGeKY9VFJpg4vAbwYM2h1/tdFZDEYq8wOMKvO+w7aXYRqCz0XD3KdAklcaLggOqTQP88+PL3JV57xq+uFtrEt4S72i4fICVLEoysRLKR+JC2yg0sumVQGPg5q6+G8Ahddq X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
fix WARN_ON in add_to_avail_list
|
expand
|
diff --git a/mm/swapfile.c b/mm/swapfile.c index 274bbf797480..879cb80bf37b 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -713,10 +713,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); }