From patchwork Sun Jun 17 02:00:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 10468333 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 78A96600CC for ; Sun, 17 Jun 2018 02:04:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 69D4728CC9 for ; Sun, 17 Jun 2018 02:04:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E29628CCE; Sun, 17 Jun 2018 02:04:27 +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=-2.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=unavailable 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 1013528CC9 for ; Sun, 17 Jun 2018 02:04:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 043A76B0296; Sat, 16 Jun 2018 22:01:41 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id EEB986B0297; Sat, 16 Jun 2018 22:01:40 -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 BB9956B0299; Sat, 16 Jun 2018 22:01:40 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pf0-f200.google.com (mail-pf0-f200.google.com [209.85.192.200]) by kanga.kvack.org (Postfix) with ESMTP id 7627A6B0296 for ; Sat, 16 Jun 2018 22:01:40 -0400 (EDT) Received: by mail-pf0-f200.google.com with SMTP id j25-v6so6694036pfi.9 for ; Sat, 16 Jun 2018 19:01:40 -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:from:to:cc:subject:date :message-id:in-reply-to:references; bh=LeMKahj/PRRicsA35gt3pl12oVGucoAeWFm4Rznk8kI=; b=gq+OlW0U+s/D3T0nd2IYuIRAYSDvQF+J7/42f0TovsP+GHijKKV9FSCpYJ4bex+ojz lOjCSxekCqRiDdSVtJ2AgHXMqPnx4YDkO0MhL8oAS9bXyVWE3hhm1g46pU7+wgTWTB43 BzWgbL8WwRDb5DYHnnYykWuPxl2wOFpUobkd5BwmKKPQib4ORIlF+z/IZK4IagecnMnO h6R09e9V1fxOPQJOQrcfEe3ipe7OeTX+w4rW4ZrUFEjif2dgJzoZw2vYUPCTNaQFVpH/ umm3ftg1joALOXx3tKjaG3gKsqODNOmPhmpMBWDhepWVyp2lNDnPAlKa9zPdtmgnOyLf jGWg== X-Gm-Message-State: APt69E2eZ+p7HLoC0maMtD7dauUsk2cFmWgyA104OiBaQ26CgXoyvfYU zQGus/dCNwSNyRy9+ps47kPqDtcJsNjLKWL7WenU4s+MYVkMwEIJ3SuTZAruN5B1hTG3VZk9Hcx AgnrfKow4l07BzDYf9YMRKzcSrUojer3zz8MzcIfyRpX4ldwGzYIleHq88I3Fr4PMCA== X-Received: by 2002:aa7:85c9:: with SMTP id z9-v6mr7964870pfn.55.1529200900170; Sat, 16 Jun 2018 19:01:40 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJcFcm/jLO4PAjYiQmyji5YfNEuKzb+Kl1zC0k6BNmfKeaMu+KgAExvDaUNIOG26qpOvziE X-Received: by 2002:aa7:85c9:: with SMTP id z9-v6mr7964826pfn.55.1529200899209; Sat, 16 Jun 2018 19:01:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529200899; cv=none; d=google.com; s=arc-20160816; b=ZzM2FesMbP6MF/lOpF76RigaZ1kxq6NtZukCBpNJG8cimqBJiYD+Dlh2VK1T2t6Ec3 3uXRR3rJOUbZy3byjP3UW+vWuXj+NC8O6QJYLmflcmw0k7YcwBM9UNsgzk+Q13JoLXPE NLQo0faLgSZgkkEx1eunYpSezv/HgEq8duqIJtSzKWoWG5BBAlgxjWF+wJBUCHKGsIkJ hWYKp2PMkBAK1iAlVbu2zIfl9552EeXpkggHNHiJKaceGPByhZTtVc0CNAz//bk21O/I 4Bp9Wvv7U28th/ZN4uYrCCS7eXIaohN20jIocY3DSEfVBf7jqRYyDj55ZP8j2+W2m1oF jOuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=LeMKahj/PRRicsA35gt3pl12oVGucoAeWFm4Rznk8kI=; b=uLtE8tyGTuKdZE1rCzyBptAtuDFmHg49e54X7KaNaO06KE5YbAEkxwzXmsfZ1qAgzL 4sJfOHs/Ou9F0sUDZlJ/4ItlOpY+1Py1lcC5O9YZ6Kqzei8qeRP3sIlRL3UNXN/sQimr ujMP7F21Z2ZFb8K06teCUiYti4TrtT89hvYO42GfxPJV75qrXoH2kISRhrvoBk3j9EeZ 8nKG5yC0CDBRPcRxgp9TZMBWw0ad0g6Smb6Yqmw0LvhPS2ghcQKvsyos0TNbLbmRIrjK sqWgioulQ5sCA/BHjsp03P+l67Xyk+4KiWwb/fOrLU5dtk1BJ6/YlLpQrIopBv3guVaK I46g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20170209 header.b=L0zQsAnK; spf=pass (google.com: best guess record for domain of willy@infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom=willy@infradead.org Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:e::133]) by mx.google.com with ESMTPS id v24-v6si11512963plo.159.2018.06.16.19.01.39 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 16 Jun 2018 19:01:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of willy@infradead.org designates 2607:7c80:54:e::133 as permitted sender) client-ip=2607:7c80:54:e::133; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20170209 header.b=L0zQsAnK; spf=pass (google.com: best guess record for domain of willy@infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom=willy@infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=LeMKahj/PRRicsA35gt3pl12oVGucoAeWFm4Rznk8kI=; b=L0zQsAnKQFSFlP3s4Uy7N75+1 nPC4veNqYhTZLIm1yjdBG+P6y3GcDSB2X9TGr+5MrJDgw/DNWH3i0UBTn/GipemFOLO/glEMXyBqd ILhchaMO4//6rB+Grco2oSAKKl/oyajy7B7vWxpILaRurOWbPMhitMD54hpel9HFj7b6fFyPWkAAa XA6NPtza3i2uZcZbm1gi3gtHWo0oRwbBU9j/whTZWYiE+vBIRlsXjvBI7zGFDtmkO6Febfx4viKX1 FRnEEeAZe0dsRtQNsgXVyePntwpIa84EzsioDduDmJjoDn2T4Y0p35yN3dAfYvngIMAi1VaZYSVvw 50CcmW4LA==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fUN0c-0001gq-22; Sun, 17 Jun 2018 02:01:38 +0000 From: Matthew Wilcox To: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Matthew Wilcox , Jan Kara , Jeff Layton , Lukas Czerner , Ross Zwisler , Christoph Hellwig , Goldwyn Rodrigues , Nicholas Piggin , Ryusuke Konishi , linux-nilfs@vger.kernel.org, Jaegeuk Kim , Chao Yu , linux-f2fs-devel@lists.sourceforge.net Subject: [PATCH v14 70/74] page cache: Finish XArray conversion Date: Sat, 16 Jun 2018 19:00:48 -0700 Message-Id: <20180617020052.4759-71-willy@infradead.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180617020052.4759-1-willy@infradead.org> References: <20180617020052.4759-1-willy@infradead.org> 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 With no more radix tree API users left, we can drop the GFP flags and use xa_init() instead of INIT_RADIX_TREE(). Signed-off-by: Matthew Wilcox --- fs/inode.c | 2 +- mm/swap_state.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/inode.c b/fs/inode.c index 077a6174dfd5..8ab03bf193a4 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -349,7 +349,7 @@ EXPORT_SYMBOL(inc_nlink); static void __address_space_init_once(struct address_space *mapping) { - INIT_RADIX_TREE(&mapping->i_pages, GFP_ATOMIC | __GFP_ACCOUNT); + xa_init_flags(&mapping->i_pages, XA_FLAGS_LOCK_IRQ); init_rwsem(&mapping->i_mmap_rwsem); INIT_LIST_HEAD(&mapping->private_list); spin_lock_init(&mapping->private_lock); diff --git a/mm/swap_state.c b/mm/swap_state.c index 5cd42d05177e..3d813d2b5dff 100644 --- a/mm/swap_state.c +++ b/mm/swap_state.c @@ -596,7 +596,7 @@ int init_swap_address_space(unsigned int type, unsigned long nr_pages) return -ENOMEM; for (i = 0; i < nr; i++) { space = spaces + i; - INIT_RADIX_TREE(&space->i_pages, GFP_ATOMIC|__GFP_NOWARN); + xa_init_flags(&space->i_pages, XA_FLAGS_LOCK_IRQ); atomic_set(&space->i_mmap_writable, 0); space->a_ops = &swap_aops; /* swap cache doesn't use writeback related tags */