From patchwork Mon Jul 9 08:38:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kirill Tkhai X-Patchwork-Id: 10513953 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 58590600CA for ; Mon, 9 Jul 2018 08:38:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 41A1C28A58 for ; Mon, 9 Jul 2018 08:38:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 358EF28A5E; Mon, 9 Jul 2018 08:38:43 +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 A83EE28A58 for ; Mon, 9 Jul 2018 08:38:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6D8EB6B0292; Mon, 9 Jul 2018 04:38:41 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 664256B0294; Mon, 9 Jul 2018 04:38:41 -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 4B6376B0295; Mon, 9 Jul 2018 04:38:41 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qk0-f197.google.com (mail-qk0-f197.google.com [209.85.220.197]) by kanga.kvack.org (Postfix) with ESMTP id 1C4506B0292 for ; Mon, 9 Jul 2018 04:38:41 -0400 (EDT) Received: by mail-qk0-f197.google.com with SMTP id w126-v6so12400653qka.11 for ; Mon, 09 Jul 2018 01:38:41 -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=OXe7YKWjRmEZE3mUe/iW/B2RET+r4Nhkxtqtifjjkfw=; b=byi3wKOtrwoFllJGAu/Rp5WW9PFfv5xC0iGTEbNHWInnGLB+AMq5lT9WanXLiaEXXF oL3C4O9d+4XzGMx06Nm/oZ0BJTyzbNSPLf8G7uRLC9ThoBYH+xWYpKaJ7AD6D4n6HZgc 2RnbK7zcnp7S4opbUXhouy3Qq5weoJLomTZmg0WGVKyglNabpNiuJYvNe9G4iiAkIuwX EiFQUxAXYNNDoAnTAnMY+AvHZKQIX5wDEm/HIdnlZoV32pWSe4kBmx0uMn9ulfAWMn/y jfnMTn7G7qhO0aMcxAJzvfat9sslrRmJWdkEjnJ9UUIyxLKvCWZu9NtLbFdib+PWcOB8 dslA== X-Gm-Message-State: APt69E1ZXnRfm+HGnvkqD41ztaYk6TKp/7zXWl/SVlrKZRUa4ZigI/4G qaUAhFcbquBskpRLA+4hd4j+86pz1/pmLdHl9os9DiGkxzf64pgxNIGZj+38lEEjfinpAZc93rT 8mVfeM/hLnbq7inxz0l/hlISymrSk5g+mZHZwTP0n3PXc5Hh8RdSLe3I5Iov23j+ZQw== X-Received: by 2002:ac8:2b23:: with SMTP id 32-v6mr18962927qtu.119.1531125520921; Mon, 09 Jul 2018 01:38:40 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfQwwh97tmXNxwDJa2MvFsBX64ZUwJgjuhZ2v/knKGL5sHBK+63GFHlPrxOd1PbGjY2s05E X-Received: by 2002:ac8:2b23:: with SMTP id 32-v6mr18962907qtu.119.1531125520452; Mon, 09 Jul 2018 01:38:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531125520; cv=none; d=google.com; s=arc-20160816; b=jNt4pCWI3gC9kQGy26pkCmUtSDbVrEKg5XNrhgufKm3Wz972P0wjKWSgUOJ2P7Xusn AcqL0Lz4/gptBQMQu3S8AJGzNLOAsHZqMWnUT0waAPGpmfB4k5mUFm3VdHMUJ2idfQ/+ 8KBD3YaKFOFTiDYHCykXHE4ck3dtiPLeA2QbZKzyiLP2EY/82ZZpxBbu1k1XjtDuhVyG 1+3l8VR1TciXvIAtg+ODQ07Gjh/t9HwmSV8WZzn6bF36csDkyl4TYZqIG8LlrE/gEtS9 pHHtG4XCJGirvhnn9FbQzOgOiG4fkaLqGHHDZ6HlxCGKur6WPE5NC42fALM1A8/u09lA FqMA== 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=OXe7YKWjRmEZE3mUe/iW/B2RET+r4Nhkxtqtifjjkfw=; b=DhDi4jsujwMtxm7dj2XBpoPMWITCMfkgbb5LxzKvfa0+4c5I4D7B1VDbguQLvsZTfv OwkekxDCHOyOySDZlC1RtR2qhpHip6Z3qIuHUd+fDjI8o6NK0V+CTx33ACF0l6hWh/QM NL/tseTwRne28jvm/lCZ2DbzXyVWtsF1RwhAPJwe1u2A+XYfvInSiz+8G/skhMKxQCFA X1jYrXjk8pRSj0XsZKjj3SamSQGy1YYLcSU9CA84NesryWfNg2DnSNoFCk5MvEE4eGyx 2btAj6Ur6Qic4mD5ipHUriP4hTw4TX3wwP06mikPDHmt6VPao0SYjQdEc3V2RK2dJvnT E6Fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=DW0pN3v9; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.0.108 as permitted sender) smtp.mailfrom=ktkhai@virtuozzo.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0108.outbound.protection.outlook.com. [104.47.0.108]) by mx.google.com with ESMTPS id r90-v6si3933026qkr.276.2018.07.09.01.38.40 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 09 Jul 2018 01:38:40 -0700 (PDT) Received-SPF: pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.0.108 as permitted sender) client-ip=104.47.0.108; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=DW0pN3v9; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.0.108 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=OXe7YKWjRmEZE3mUe/iW/B2RET+r4Nhkxtqtifjjkfw=; b=DW0pN3v9owO1oAOPN/C0yOIIxDdb3VdS6c2Ss8n4eNQxnmPPQjt9bzlAays4qoSOmW5hqjDI+45CiGGlLUPOzSYcKCLcjz97ihxk3LUjRt5t2KVTt600RYTwfco/eeJ4Qe94Rpy9DpmOWmEf93itSfQcxyt1GpNByCJZuUPhCi0= Received: from localhost.localdomain (185.231.240.5) by DB6PR0801MB1334.eurprd08.prod.outlook.com (2603:10a6:4:a::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.930.18; Mon, 9 Jul 2018 08:38:35 +0000 Subject: [PATCH v9 07/17] fs: Refactoring in alloc_super() From: Kirill Tkhai To: vdavydov.dev@gmail.com, shakeelb@google.com, viro@zeniv.linux.org.uk, hannes@cmpxchg.org, mhocko@kernel.org, tglx@linutronix.de, pombredanne@nexb.com, stummala@codeaurora.org, gregkh@linuxfoundation.org, sfr@canb.auug.org.au, guro@fb.com, mka@chromium.org, penguin-kernel@I-love.SAKURA.ne.jp, chris@chris-wilson.co.uk, longman@redhat.com, minchan@kernel.org, ying.huang@intel.com, mgorman@techsingularity.net, jbacik@fb.com, linux@roeck-us.net, linux-kernel@vger.kernel.org, linux-mm@kvack.org, willy@infradead.org, lirongqing@baidu.com, aryabinin@virtuozzo.com, akpm@linux-foundation.org, ktkhai@virtuozzo.com Date: Mon, 09 Jul 2018 11:38:32 +0300 Message-ID: <153112551213.4097.4983689312654935877.stgit@localhost.localdomain> In-Reply-To: <153112469064.4097.2581798353485457328.stgit@localhost.localdomain> References: <153112469064.4097.2581798353485457328.stgit@localhost.localdomain> User-Agent: StGit/0.18 MIME-Version: 1.0 X-Originating-IP: [185.231.240.5] X-ClientProxiedBy: AM0PR01CA0030.eurprd01.prod.exchangelabs.com (2603:10a6:208:69::43) To DB6PR0801MB1334.eurprd08.prod.outlook.com (2603:10a6:4:a::28) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0d6dbedc-8d3e-4abb-82ba-08d5e5775d69 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:DB6PR0801MB1334; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0801MB1334; 3:kNses7csZOXNS9YoYH+4cqOOh5bf8ssclrvGYvBg38F6yaT80MPTHpE5rBq+0z1tLV16xvlr9JOe1lE2xZW858jAv7Uj2KLL1TmjPSmUVDxusNFqBdRxQIELP60JJLdsDGLm5R6pRd/QXNfRgCDlVLa9eIJt3pgTGVckRvPB4BYVPcVRusc3h0cML5A313tiy0pET5CFoRYH+9XbkrqTf34L9MZRwKhIB3XfGtARKKC1K3A3XOdW7UwehQx2A0H9; 25:R+fSL6+r4joXzVPeg2LcpXizY9P62gAI9GaZ8IR1iQEXYbtseUuv45YJlSY9obAHGJP2C/YPDoBGElituunsR0JvT73xGayNs/N2KmyEMjYnCoYCI1N90OW3bcq5+myurkrvl8JAcELMbc7/FPfFF/DaDeO8Js9Be5r1opAnPT111fVaM69d486SOiX4QNqs/KkJgnpFJHx+bZk+qW8w/k5ctxsc4iupetll6Fo9i+9cPnTZzJeflx9ft0pxzZOU2JpT+XSEaeZbwXfBPqYzsqGDlgyYrMqjKjVJ58gV7KkjCK7Jir3jzPT7Fupvl2aQeudBeNg4Ghy2xCwUhLnEPQ==; 31:r0k82yo0plKrX8kRJC6lT+hlfcIP/Le96xvhPK5qizIYfFdXlUS+PAoEn8rZ4E7rjSobYEBVC6uK062+JtwDRFVAV6uuzfsAJcQ5NWgXQYbTpb/GU4JRMBVPgqCkTfesDPFlHYjjyQeE7l9NHvymtaw54W9yy3xnLE4pzYbdRXMUaAcFaYChori7pCQBylo8kfADaGUCqTNmqi5Y/W3W+Q6xzKuhVzRpcF3pFda2MHU= X-MS-TrafficTypeDiagnostic: DB6PR0801MB1334: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ktkhai@virtuozzo.com; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0801MB1334; 20:SNhJb4oaSwbSA5q+VAZhbkzUhQxvrjaGfZC2lSsOUhAvVkPeDbgxS1ySWLcez8lcxZp6sAbFqH4Z/VYH+y15L6rkAkgfWJDee2JcvhzpqxFhw5CMKE6cw8QmXh5rMet8BrWqN3mwKqWcxf44OzxzfghQZHbaB+fChZhRRPWpXaQhZj7tcdn4emXgTnawktGqzHED+hiGLB/TKAM9nYVuolJ0zBsrbsaAJQPBJ7moZwkPXuzUe9OJnIFK8XdL28MuqKyDb0/BXaVXLjfUkK4Egf+big5kGNB+I6HiNVMFbhJjcUDLy3nnH1FWYHHOPYvMG9O53hSkfwji9Dqef3Z9cxToMbJkrb9iKQtz+BT0vvd9v9QwVwV0hQfVIq9SmoaqzFkJk3LW1JKeCVn7XrGWhDIgzj/8sE80QX7/WSuBjAC4FMPTwYCOM8jmgJl2BHsC69sY1qaWXo+z9ie0+zGXameA9vHpQFrK2bHx8xj4wXXN5me0TJxNjz8hkJ6bkKWU; 4:J56+Qiugk/M9RnkoFv1wPa7DJIbWz1eZ8/tI+z1yDqgvaKafh0vUdmuk9TqzsAtxyvWz3OwbD9GiYxAVsQMeiz4WgU1NM7UVVZFa5gK80djW0hAaRdY1s7WOaH1qoqIJ5Gvqjpek5Wj3g6VFC/pqcQroJenLzWyFiLTYkHMZsapI44zImWXUl3W1hByp3kIAzdEAUWS0H4BZsHAh+MgW6q52gls2TKOqkOByT73pv+W+L9HYIPxOE/Y/vdTgIVE9gtmTGhp4mav3of7Zt1y4NiKAWtZ0Ky/i5UH+HNIyZYCOmsKvWup7JC/5ndHHlZwYrGnzMLiisN19996b93GNOZ/fLmzmmfCB+5gmv2suKIlfU+jYBEOBdKxIEQT9b9GE X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(85827821059158)(211936372134217)(153496737603132); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(3231311)(944501410)(52105095)(93006095)(93001095)(10201501046)(3002001)(149027)(150027)(6041310)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:DB6PR0801MB1334; BCL:0; PCL:0; RULEID:; SRVR:DB6PR0801MB1334; X-Forefront-PRVS: 07283408BE X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6069001)(396003)(366004)(376002)(346002)(136003)(39840400004)(199004)(189003)(33896004)(81166006)(103116003)(316002)(2486003)(23676004)(66066001)(6116002)(3846002)(53936002)(68736007)(58126008)(97736004)(7696005)(52116002)(386003)(6506007)(8936002)(230700001)(106356001)(5660300001)(105586002)(14444005)(25786009)(47776003)(50466002)(76176011)(8676002)(7416002)(81156014)(26005)(7736002)(186003)(39060400002)(956004)(478600001)(476003)(61506002)(6666003)(446003)(2906002)(86362001)(9686003)(11346002)(16526019)(305945005)(55016002)(486006)(921003)(1121003); DIR:OUT; SFP:1102; SCL:1; SRVR:DB6PR0801MB1334; H:localhost.localdomain; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtEQjZQUjA4MDFNQjEzMzQ7MjM6cVBUYnVRSENTSnE2enNCYmxQekpKNGZa?= =?utf-8?B?NGNVWHVLWmlsOTN1UEI1bnVkUy90U0FFT2o0VjhiMnhCcjR2OUlPVkk3SEMx?= =?utf-8?B?bVB0NEFFUFczRy9ZNnhEUjJpbFF3UXgxZmVHTXBZQkJaaERJcjZnT1JaQmJ6?= =?utf-8?B?MGRibFF5WGIxcnZ2VGxYRFAvTk9XajVVUWRqdnl2VDRCYjlHTldLb1RwNVNo?= =?utf-8?B?MTVlSTFUVGhCNDhHRDBBc21adm8vZ3E2bEF3RXBBcnM3ZXFrdDczdTZUMnNX?= =?utf-8?B?S2lQN2hKT3V6SGVHVUJXeGxGbkRyS21KMTdkNDB4cGRYKy85MUhKSnQ1NjQ1?= =?utf-8?B?dW1JRTRMS1k4MThjQTdhRFZYU3NWUEVia2prNXloRlZiaiswWXNmRXpDTVNp?= =?utf-8?B?Tlp6Vjh6VXNXQXpuUGhLd0xEendsUVZCcjU2ZmFnd0YvZzlUVjFGYnlXZ1Nv?= =?utf-8?B?VlVSeUdqZ2Y1TlpUWkVOVlk1TjZDK0E2YXhiQ2VQVzh2NDlVK0RaZ1JzZHBG?= =?utf-8?B?SFpwMEc1MXFmdmZDWFdRekdUR2VSM1VtOUF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SS4teughDxzb/aHbRHzmTu/Wavgqqb+EXQzVLUFe8Uc1xaVx4j66YmEvHdVGq+noBneD4LQm8BbCWCQoyodKDAI5EbU3MCTVYjt21omTWvXhH8j8Jcgx5R4abGe17tFICM3spw8eiyx/qvIqwuT1ASWCR+xzkgvKa4I2hbMyrwKC2w4DfyQ==; 5:cDzTPi5/Imwvs6Kksnoz1Aplz61GNvRRJ45qCSyqf+/nmmyZWs5dnk5kMrs8kGwC58Y5gFmQ4QULPWmyMlnQIDMoHjVANGz34/gJtPwjIdMOCXLaIsHFnGuC2GzbPTeTzVWqTY5csBKynoJBKqa89eXFFzvlPYDUeeg/QuNAqZs=; 24:AmpzhEPJA/Fitc9gLgJQ5XZq0qqNXfn47wyV/uHaMBTDM4b6TGgJEAgkXvqXWlOi2Wkrwgd3dK7IkUCBO9kMNlnjMc7Gcs3EoD0QR+WJ26s= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB6PR0801MB1334; 7:7/F2zR7Wk7zoBJ9CxUEbc5kT3unO0YqF0I5xg8CeGlQ/65UiHxgjYZgrjS+lRTWbfO9jcumw6dRwOoc4EMdQMXcQ57h9yvOq1zJo3vbfdDCbPz7sFmDqX+pK7eS9SM3dPVDkPmuQ8SNe7+yyV5+cNwrFbdZN2vbt6hxsP7oiN9ff9//HjGvZoezyQa+qRC2tQHXVJVY6dnW1VwhcG/Eua0k/QLbtZbpmt7ARRrm/r8R4j0+BiowLquslhclGsPN7; 20:G6gRajAb/zgn23GRbJCs0tJlQcXrhvT9LR3r32ACTwW4ql56JbnlWfNHb3U7MDRnjkfL0Q52gfUXM9JE3iyNOpFDnuDZeVbvCE2hFSQCz03BJne3O0dGPon+tcc1pGw16do3vv+w+p4zXOFE0rAcBBlWG74LUmD1HG3kJur2fG8= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jul 2018 08:38:35.5432 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0d6dbedc-8d3e-4abb-82ba-08d5e5775d69 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB1334 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 Do two list_lru_init_memcg() calls after prealloc_super(). destroy_unused_super() in fail path is OK with this. Next patch needs such the order. Signed-off-by: Kirill Tkhai Acked-by: Vladimir Davydov Tested-by: Shakeel Butt --- fs/super.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/super.c b/fs/super.c index 50728d9c1a05..78227c4ddb21 100644 --- a/fs/super.c +++ b/fs/super.c @@ -244,10 +244,6 @@ static struct super_block *alloc_super(struct file_system_type *type, int flags, INIT_LIST_HEAD(&s->s_inodes_wb); spin_lock_init(&s->s_inode_wblist_lock); - if (list_lru_init_memcg(&s->s_dentry_lru)) - goto fail; - if (list_lru_init_memcg(&s->s_inode_lru)) - goto fail; s->s_count = 1; atomic_set(&s->s_active, 1); mutex_init(&s->s_vfs_rename_mutex); @@ -265,6 +261,10 @@ static struct super_block *alloc_super(struct file_system_type *type, int flags, s->s_shrink.flags = SHRINKER_NUMA_AWARE | SHRINKER_MEMCG_AWARE; if (prealloc_shrinker(&s->s_shrink)) goto fail; + if (list_lru_init_memcg(&s->s_dentry_lru)) + goto fail; + if (list_lru_init_memcg(&s->s_inode_lru)) + goto fail; return s; fail: