From patchwork Tue Aug 7 15:39:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kirill Tkhai X-Patchwork-Id: 10558823 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0AD0214E5 for ; Tue, 7 Aug 2018 15:39:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E9E692A46E for ; Tue, 7 Aug 2018 15:39:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DD42A2A471; Tue, 7 Aug 2018 15:39:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 50C682A46E for ; Tue, 7 Aug 2018 15:39:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 559886B027F; Tue, 7 Aug 2018 11:39:16 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 52EFE6B0280; Tue, 7 Aug 2018 11:39:16 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3F8EF6B0281; Tue, 7 Aug 2018 11:39:16 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qk0-f200.google.com (mail-qk0-f200.google.com [209.85.220.200]) by kanga.kvack.org (Postfix) with ESMTP id 11C386B027F for ; Tue, 7 Aug 2018 11:39:16 -0400 (EDT) Received: by mail-qk0-f200.google.com with SMTP id v65-v6so16806855qka.23 for ; Tue, 07 Aug 2018 08:39:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:subject:from:to:date:message-id :in-reply-to:references:user-agent:mime-version :content-transfer-encoding:spamdiagnosticoutput :spamdiagnosticmetadata; bh=ZoweZLAYp3KgFZo2uGoPuYqg3viLGocWgESzGgqHXy4=; b=EQ+PR/8X/lDjXQZna/NZz3TbVWEhMI1R9OcqirmoGxQsqeyd9Aq4YXplK7/MMQmoiP vri0Fo4YAsG/Kx8A4tx/GF5GRFoUyKAiksZ/3uofZFCDmxss84tpDZKYC+le0nle5J5u 3pX6jDcQZ8kxz8Hf0VAdzDYDTy/gCLaasZ5Q5oVOJiM3/YzNAeFLKK6DWZ/1Qlr/ULbs JounOXFNO1YORxxitSVvEUU1DccqOVDTdtHhz+NpUkCVzQpOiPddf8tVRAjJDhbxd1Bj yg3pZcVtW4bdjUJXScgYbnTrgb5p+3UMKKu7UIwSp5VjjPvpVxG6OeRCXY92/C21y0dO uO8w== X-Gm-Message-State: AOUpUlHtVyD2nQozYdQKKGAe4z87l8TLwhrthO+bhXVPKQ+4AtKcCQxD LIQlnL9iXC8wgPYdi08K7tDITl2INrIs9KdAs/ly3ZYdWPc93y2Qo+NZYMewaCIBba5HMtDDA0k WkA3KLNyMREioaKBp74sZv4hAPabwRSNPd6akvI1zx4z3u/7MgpLL7rNUtR/XqQlRrw== X-Received: by 2002:a0c:9259:: with SMTP id 25-v6mr17160712qvz.239.1533656355848; Tue, 07 Aug 2018 08:39:15 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdI9vSWWbe04KomMGVqgFsDS1tU5Qx8EU6sj4mXqy8yHUNkEtai0GkdDDV4KBLRRa2945LF X-Received: by 2002:a0c:9259:: with SMTP id 25-v6mr17160670qvz.239.1533656355221; Tue, 07 Aug 2018 08:39:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533656355; cv=none; d=google.com; s=arc-20160816; b=ojWrLSowULHkQSdEPA6Tpe75uUT5vUCV7mL6XHWZffK6x5ZNJecwneR9HPJy5o6swV Llua+OK5aPBDPmDBQzxSEkxbLi0clJsCDqD+8rw/AfB3X5JAs8sZG2+95iLQyyBbiCvg cZwnPMgiJEvu7v3hG5KI79KQvOeGdlCnNhiLq0FYIBnkEzZQ66ONIGTK2kiWwmmXz/Qa 8QAeM9rhlR0gcyrChjSK8RWsbgTuNX0PuWWBgYqz8gCyCexeFc/WrKhA+hy5aogj27Hm e9GtojpcC5SUO8ZjrMPUPQMERyIYG+/teZ/FHGMnQnzIUC3E1EknSKZLv6Mc0ojv+02g A46g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=spamdiagnosticmetadata:spamdiagnosticoutput :content-transfer-encoding:mime-version:user-agent:references :in-reply-to:message-id:date:to:from:subject:dkim-signature :arc-authentication-results; bh=ZoweZLAYp3KgFZo2uGoPuYqg3viLGocWgESzGgqHXy4=; b=G/pVbXtaLHosG5uNWMEbeyyc5f7NhtYJdeok0aIYSnOFQGsgnziQjHhC2uNlaQtK77 O7xXWIkYPBJAmobhN7ye1tm8FWZegsg61MXxkDgGQ7M1WRYQgFtJWQn5SgPxeaR4Oh43 zJ3eZTtbZEeHiVgZzwsExD7lOcI+N1kDftxcKN/+vHpiiulPSCzeC7VgkLjJIXBhuIJF HNXYA/SZKb+qDgwGXPk6hSXXdzFFUbKdLeCIinJO2MfJYofZvemsh25hlNISBxsEELB+ a91lgSEDPTdDkVa665SFDkoqFQu9O9FRK4HlgdO2kFFNkV9V0d8ZdD+9QR/rJVYxQpSf T5ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=ehEpoLAC; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 40.107.8.137 as permitted sender) smtp.mailfrom=ktkhai@virtuozzo.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80137.outbound.protection.outlook.com. [40.107.8.137]) by mx.google.com with ESMTPS id a125-v6si1575984qkb.47.2018.08.07.08.39.14 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 07 Aug 2018 08:39:15 -0700 (PDT) Received-SPF: pass (google.com: domain of ktkhai@virtuozzo.com designates 40.107.8.137 as permitted sender) client-ip=40.107.8.137; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=ehEpoLAC; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 40.107.8.137 as permitted sender) smtp.mailfrom=ktkhai@virtuozzo.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZoweZLAYp3KgFZo2uGoPuYqg3viLGocWgESzGgqHXy4=; b=ehEpoLACvT4MSoIHIof2+EnXIgtOW0VGWaEzFeJR2z4akYSCS3lGlHBQNA9ghHD3vCpGm/GZOCq8KQXRjpgVNE5aR6R9WJfJcWbahEu2jKJOKaZlnMguX3slyF+QpRr5Rgzg471MrO0tUMo/1xDf7wTgclClBwOoeHOOTZPe2zg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ktkhai@virtuozzo.com; Received: from localhost.localdomain (185.231.240.5) by VI1PR0801MB2029.eurprd08.prod.outlook.com (2603:10a6:800:8b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1017.15; Tue, 7 Aug 2018 15:39:07 +0000 Subject: [PATCH RFC 08/10] xfs: Introduce xfs_fs_destroy_super() From: Kirill Tkhai To: akpm@linux-foundation.org, gregkh@linuxfoundation.org, rafael@kernel.org, viro@zeniv.linux.org.uk, darrick.wong@oracle.com, paulmck@linux.vnet.ibm.com, josh@joshtriplett.org, rostedt@goodmis.org, mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com, hughd@google.com, shuah@kernel.org, robh@kernel.org, ulf.hansson@linaro.org, aspriel@gmail.com, vivek.gautam@codeaurora.org, robin.murphy@arm.com, joe@perches.com, heikki.krogerus@linux.intel.com, ktkhai@virtuozzo.com, sfr@canb.auug.org.au, vdavydov.dev@gmail.com, mhocko@suse.com, chris@chris-wilson.co.uk, penguin-kernel@I-love.SAKURA.ne.jp, aryabinin@virtuozzo.com, willy@infradead.org, ying.huang@intel.com, shakeelb@google.com, jbacik@fb.com, mingo@kernel.org, mhiramat@kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Date: Tue, 07 Aug 2018 18:39:05 +0300 Message-ID: <153365634503.19074.14972123229522734895.stgit@localhost.localdomain> In-Reply-To: <153365347929.19074.12509495712735843805.stgit@localhost.localdomain> References: <153365347929.19074.12509495712735843805.stgit@localhost.localdomain> User-Agent: StGit/0.18 MIME-Version: 1.0 X-Originating-IP: [185.231.240.5] X-ClientProxiedBy: VI1PR0202CA0034.eurprd02.prod.outlook.com (2603:10a6:803:14::47) To VI1PR0801MB2029.eurprd08.prod.outlook.com (2603:10a6:800:8b::10) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8580e0cb-9690-4303-228a-08d5fc7beb38 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:VI1PR0801MB2029; X-Microsoft-Exchange-Diagnostics: 1;VI1PR0801MB2029;3:bKv/zYxfBTC32Bt4PdjDxkMDGkiEuoix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GPVvR3O/NF/FFxUshTdJ1M/haybfMORsHtLHkpF77sUWwdvk/u5L1cbrs6o+LeTN+BvK836wQdei2MzbkQmOQDreUnIKE0FJ4dZZQ9d533TSA9BbtAwN1xSYxHAri+3nHVIjR6tdIYXF1BWST2WpiJ7a3lfwGq04K8CVndbXYyaJZtP/rEDieoLrnPIIKv5kmz2IDF7/3cJUg0IeNQsU/E1CVtvHGFuqrNudf146OBj+8e97VZNxFXtlVEPcuskTmiHwZyWjxNMWKVkR5PDy5jkERLOhRtdDBhZ4fsg9cXSPKSHBKJYVcI6kJOywr4sxKKB3SjlO;4:fo3mvZA5p8bXyVx+BwDz9KJ5RokYwm26xEuW9P8xol1kPPyuCgsEquT1xZiOa6SWlcIiDVH41WSJBpSZljicUMbQWhtrJPDLTrN7UcRZTZyinVOAEfeJbksMLhEcG3nYDk9YYfJJEAhNJt93R+ZBRwdGSL/1Yzj2g/JSjZUHb23Q62rauVHysTfN8mVDMk6vYATlB6MgWvFsyFMsBVJozZQg7E65GA056NdFvXyZpOXzQKFz1arIXO19vGTGqOZ6m5YgLW0H/bP2leDxnZJbpQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(3231311)(944501410)(52105095)(93006095)(93001095)(149027)(150027)(6041310)(20161123564045)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(6072148)(201708071742011)(7699016);SRVR:VI1PR0801MB2029;BCL:0;PCL:0;RULEID:;SRVR:VI1PR0801MB2029; X-Forefront-PRVS: 0757EEBDCA X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(39850400004)(136003)(396003)(366004)(346002)(376002)(189003)(199004)(486006)(230700001)(53936002)(86362001)(11346002)(956004)(2906002)(5660300001)(476003)(446003)(14444005)(7406005)(7416002)(16526019)(186003)(26005)(55016002)(217873002)(3846002)(9686003)(386003)(6116002)(6506007)(8936002)(50466002)(478600001)(23676004)(47776003)(81156014)(8676002)(81166006)(103116003)(68736007)(58126008)(316002)(66066001)(7736002)(105586002)(52116002)(76176011)(305945005)(7696005)(2486003)(33896004)(97736004)(106356001)(61506002)(39060400002)(25786009)(921003)(1121003);DIR:OUT;SFP:1102;SCL:1;SRVR:VI1PR0801MB2029;H:localhost.localdomain;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?q?1=3BVI1PR0801MB2029=3B23=3AtLspv?= =?utf-8?q?pg725frnoozu+jchTvwn5IhWezARy2DQAWX+DhMLUABWBg9qjRqLPL5q0m7Mcvb0u?= =?utf-8?q?tQRQVEQnfCLqnUxXFnjkFSpqFQSMznij70BaElLDpdkNGAyziz7m464RbkvM8aiNa?= =?utf-8?q?9N3sCJEJFWaBc6n13dZsXXW2ux4gSUIIcr3LNnUkZWDqxUIQhZueUBlYy3PijXivm?= =?utf-8?q?clHd6OcYruquVTL1qnqbTvzp6PnGywBQe6TMwAt6Dy+aZ8rHTokxVpLXbUlq6xor0?= =?utf-8?q?JT5XyTb7Ir5liOmYKLbjlkjMAl3swqEgE4tiA49maE87C2pojeE1QIb94l6Whm/E5?= =?utf-8?q?5k7QXPJXevHTCcvX6Ilu1ONZH0x8GTlxCcKaZZzxXBOF/YpNS9+ige4i8PanRUnWL?= =?utf-8?q?M4k+l0oKGMk6zRlgmzAMWZQuBgaEjMO5G6q1T3V7uCQDyyuuigQHtLqK6h6nGGbWW?= =?utf-8?q?FdXEbnjwEcrTL98ato314w1z0r9LtlEVjTealdYWazh5+sbUy1EdYEjhK0+5U7iwI?= =?utf-8?q?Imav4LfWhpm+FhO56rh9HuaUfkRXZD1kRRvFFHJndSDLsqetqvXcPLZjNRXHBieuH?= =?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2ig8RPwtIP4kEi/U97Mlat3G2GaIOY8c+M2Nfm7KJ0vcr06Sp SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;VI1PR0801MB2029;20:wzUR5MiLoJ2LdUk+9fVYX4n+qfuvA4cgzDcC7Sjtjo+CMtqqSC9P6Y+QP1MyrxGYFbjS7sgEEWnQuL31k1L2VdqI5z3MltTn/hZeREMTUZNeD832GAm+x426hJ2s/r/hviy8OHid2h/VA/CX/IkjKj23YxsvdRlH2P8gg9UKBXE= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Aug 2018 15:39:07.7794 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8580e0cb-9690-4303-228a-08d5fc7beb38 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB2029 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: X-Virus-Scanned: ClamAV using ClamSMTP xfs_fs_nr_cached_objects() touches sb->s_fs_info, and this patch makes it to be destructed later. After this patch xfs_fs_nr_cached_objects() is safe for splitting unregister_shrinker(): mp->m_perag_tree is stable till destroy_super_work(), while iteration over it is already RCU-protected by internal XFS business. Signed-off-by: Kirill Tkhai --- fs/xfs/xfs_super.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index 9e2ce4cd98e1..c1e00dd06893 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -1774,11 +1774,20 @@ xfs_fs_put_super( xfs_destroy_mount_workqueues(mp); xfs_close_devices(mp); - sb->s_fs_info = NULL; xfs_free_fsname(mp); - kfree(mp); } +STATIC void +xfs_fs_destroy_super( + struct super_block *sb) +{ + if (sb->s_fs_info) { + kfree(sb->s_fs_info); + sb->s_fs_info = NULL; + } +} + + STATIC struct dentry * xfs_fs_mount( struct file_system_type *fs_type, @@ -1816,6 +1825,7 @@ static const struct super_operations xfs_super_operations = { .dirty_inode = xfs_fs_dirty_inode, .drop_inode = xfs_fs_drop_inode, .put_super = xfs_fs_put_super, + .destroy_super = xfs_fs_destroy_super, .sync_fs = xfs_fs_sync_fs, .freeze_fs = xfs_fs_freeze, .unfreeze_fs = xfs_fs_unfreeze,