From patchwork Mon Jun 11 14:06:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 10458039 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 6F64F6020F for ; Mon, 11 Jun 2018 14:12:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 57E2F286DD for ; Mon, 11 Jun 2018 14:12:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 508F228831; Mon, 11 Jun 2018 14:12:57 +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 2D624286DD for ; Mon, 11 Jun 2018 14:12:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 59EE96B02A9; Mon, 11 Jun 2018 10:07:17 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 462C16B02A7; Mon, 11 Jun 2018 10:07:17 -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 244046B02A9; Mon, 11 Jun 2018 10:07:17 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pl0-f71.google.com (mail-pl0-f71.google.com [209.85.160.71]) by kanga.kvack.org (Postfix) with ESMTP id CC1D86B02A6 for ; Mon, 11 Jun 2018 10:07:16 -0400 (EDT) Received: by mail-pl0-f71.google.com with SMTP id b31-v6so12206870plb.5 for ; Mon, 11 Jun 2018 07:07: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:from:to:cc:subject:date :message-id:in-reply-to:references; bh=rkKDu3vTH95GYyX6Q7oTKTgCqcU3ZiAjGwWtWlGisVY=; b=b3l7IM8YTGlyg5gsUr2O27gjGc+C8Lm+4BbmZC0y5lCSeyEwhMhmiwllErVjoj/zcp sLTPXdwiKgaMsT/d9hUVcR92KDiJWrQqHqRWlRI89snY2l0rdvgXdmYrMcrtN5Aeimeg Awkn4QmLxXNLpJUQXiLUSy8yiOcZS2h8yAzMUKDk8u2cQnDJS4IE+IeDYxrMNhaMhoaA c3XCM4wQ+ogSA8y+T9GpZsYp216OCJh4tY6xT2veGVgypEm8sWe01b6MXuEoHVIeiXMT 9+vQ0/x25uH2uaIYD1YF/j29ksObRi5Zcf/w73ZZGESMqbwq8TiBkJBjhfX06+fasM+t ZtAw== X-Gm-Message-State: APt69E0jsfNeRC6hKtOmA5h3byjVQli/gjc4ty2EzVHwMXqmlugy4PP7 WTpZOcvjtUqJfdbXL7L0D5sesI5/dEudGcOdWCJ6jUG9VfQQOcrSNc/eRVkeyH++RgaecJ2mRXl 07Vb5kbG58+DMmqZ5WuXfW/06DGAHVCRDzl8dBitlksASj0kdLFuKNBq3/rZtylO5Lg== X-Received: by 2002:a63:62c7:: with SMTP id w190-v6mr15312560pgb.104.1528726036504; Mon, 11 Jun 2018 07:07:16 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKC+Yuz5MXDf5GNPBOxQs6++yIBxzwT8zuoJGLImqz+WeL5typ9qC6XuHuF5tqEt13SqNg6 X-Received: by 2002:a63:62c7:: with SMTP id w190-v6mr15312516pgb.104.1528726035762; Mon, 11 Jun 2018 07:07:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528726035; cv=none; d=google.com; s=arc-20160816; b=PEmHqJ5xmCjjJp1Uyyw7hAT9tcAv6KxLaSoQTp+MwtwxSlHc3SvXna62UKMjy2S09B mxVaKTfd6dbpEmTT+lBrWoR07MBHIRe5YqILB0SRNTG0VmngobDXoCoUfCLIJ78iAWrf 7xIkUHBo1Qqz3Gmh15C5zNM3hvsPzAmJnTePqmw3bXqqFIYajoz/YdnCctNxMHjSWHhL 5W4WtvLBTpXRnDKNxjILEAwa/G9sTJitA2T33TtJoBaLkbKScwwGpFmJs2ip9zXL38NZ jrVUssPF2lfIe3uHHhktp/ZUbkgdpshgi0YLKEZj4RlZvho++BLJyeQveOR5/OYLDzFR bHhw== 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=rkKDu3vTH95GYyX6Q7oTKTgCqcU3ZiAjGwWtWlGisVY=; b=UdGLmJ53MtcS/ONtH2OntZv4I42uVx3ZVy5cJ777YMuCtz+DHHTsrUBuWbQTH8f+Y2 lmARAggw/3JZzqkfDb0nWRCk3YnFqi1UCROhZPOLowqz85VZIMoLxz+BK0/ngqkfVfF0 3G/DcQXVdnz4Bd70YiUZpYrRVBAhSrThAvIj2Fn9vb6xydIqk9+EPQkD13R4dvoehUmS i55/Rbt4eddjaOl1o3AULidgdo4WMf9oDLDl+6CSvNxV9Gd6BBtHWh5DCb2W7KN0w6Bp fw5IH6gnO5YdvF92ITUF/KHbTc0UcOw9OQuXmWfKxlkd4jkryw6/LoU1uHI9/MZWo49q YUwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20170209 header.b=LozaAukS; 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 o15-v6si6581805pgv.580.2018.06.11.07.07.15 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Jun 2018 07:07:15 -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=LozaAukS; 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=rkKDu3vTH95GYyX6Q7oTKTgCqcU3ZiAjGwWtWlGisVY=; b=LozaAukSqaOLKf9BKzR5XnhLn TQ1Q/54HKr3xYSppi9uWakcDM6HeUF7aRKv251JJbg6AAROh9sFKY/HqovaOVtc5LKErsre/Sb3Ky ezTrA+BtIGgfQpWjagzIblxOVGen1Da25+KPCT8dFgZb2fVeucNxtmpeNRu7Wz//FZeG7Nq3T5VEV L6xsDUFYOTY4zFU+mYi+wYuYGMVjpcr8SEy+sB2ZEjrm7gSvDD/d9O7UoyABk8olkN5v6IPgJ95RF rkH3Fh1LBpkrde4lqkrNAzQMnaxswBp5z/2k6nugiVV+9D8IdJugN0Wq9f+RD8xN5Zx41XzCvI/4L QVZHXyBkw==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fSNTW-000544-6F; Mon, 11 Jun 2018 14:07:14 +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 v13 68/72] page cache: Finish XArray conversion Date: Mon, 11 Jun 2018 07:06:35 -0700 Message-Id: <20180611140639.17215-69-willy@infradead.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180611140639.17215-1-willy@infradead.org> References: <20180611140639.17215-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 From: Matthew Wilcox 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 bdc5e952ebbb..4ea629d7d32c 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 84595e1a4cd7..eee052936b66 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 */