Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp209029iog; Wed, 15 Jun 2022 00:09:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9QbVHpNDNidif/4a44rs4BBW4eM0hqztGyF13i0jMqaeFl55I1pjTt6q/O7NUzXq4LrpC X-Received: by 2002:a05:6402:709:b0:431:3a54:5cbb with SMTP id w9-20020a056402070900b004313a545cbbmr10910978edx.355.1655276949333; Wed, 15 Jun 2022 00:09:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655276949; cv=none; d=google.com; s=arc-20160816; b=iQxgimgjj1Lyk+DPqYsVm3NW5v4JuTg28ihQRdwXDF9wMZJsdMDcZFJmGBBe6RaHle lRZ/dwcgaNasPoNCq/CnMXAGQf6Iao6NVQTt7wncGs5/vfMjCe+95eBrFnFkRHzz4Qyt 7dDzbx8kuxzO/Kl4QkMVYN0VcDz0jcExdx3g4TtKZZKc1vHTdvtLxsQu4t0R5AQ6si3h DmT7eE3e/nQJM5MJpQ6AK/+1Hx8CTWbT++LJCNVsnsOHVrJH/E8/CCN7nw2YhMbP1xKC hMRvG1W2NM5AM2k64ijXjJStRcYDXOsLnHMIu48KobLuB3tUvzYrQ/4oS41ZZ3nCyaBK +dqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=hmpo+doqV8fjl/7IyeUKO7SvD2EkbS6hURjboKLFCxE=; b=lA5aVWpoDRQGc6VYbsq48sfSzxUCiv2DqA2mB3woUzEf56KJ5m1tLE8drlK1FvANy+ esm/YjjpwD9GS354HNrxBcM+OzL3MSwhXfm1ZqFJELarvNyYCCYfmwMCOPsJRbX6/57a ambZ+IEbe9kLI3+Cs9bHXxdgqUo5WjHeZpkVCH1ELjsp/i10KV+X0zLAXSajJKBCvT/b uUN5YKwrRhUf6IA0QKu1jQtnZiLRvioCWwegs+4pU/ncqM9HclKkLHa3TjAOOecPhXiW jjLVfFzvw6K/QyykcpvdO4P/M0IpHPDVCqXZvqYMNAki2Q1IC/6/n9weoYa0jR1kEcdr YWpg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cy17-20020a0564021c9100b0042dddaadeb3si13231333edb.567.2022.06.15.00.08.43; Wed, 15 Jun 2022 00:09:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234950AbiFOHCV (ORCPT + 99 others); Wed, 15 Jun 2022 03:02:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230083AbiFOHCT (ORCPT ); Wed, 15 Jun 2022 03:02:19 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91D102A969 for ; Wed, 15 Jun 2022 00:02:17 -0700 (PDT) Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4LNGRK1pKfzjY4B; Wed, 15 Jun 2022 15:00:45 +0800 (CST) Received: from kwepemm600016.china.huawei.com (7.193.23.20) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 15 Jun 2022 15:02:15 +0800 Received: from huawei.com (10.175.124.27) by kwepemm600016.china.huawei.com (7.193.23.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 15 Jun 2022 15:02:14 +0800 From: liubo To: , , CC: , , , , , , , , , , , Subject: [PATCH v2 0/2] mm/swapfile: release swap info when swap device is unpluged Date: Wed, 15 Jun 2022 15:02:26 +0800 Message-ID: <20220615070228.2858170-1-liubo254@huawei.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemm600016.china.huawei.com (7.193.23.20) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series patch try to fix the problem that the resources corresponding to swap are not effectively released when the swap partition disk is hot-pluged. 1/2: Extract operations of resource release in the swapoff process. 2/2: release swap info when swap device is unpluged This is a second version, which addressed some comments: 1. turn first patch into a two patch series. The first does the code movement with no functional changes and the second does the actual fix. --- For v1, see: https://lore.kernel.org/linux-mm/20220528084941.28391-1-liubo254@huawei.com/ --- liubo (2): mm/swapfile: Extract operations of resource release in the swapoff process mm/swapfile: release swap info when swap device is unpluged mm/swapfile.c | 261 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 183 insertions(+), 78 deletions(-) -- 2.27.0