From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Wilcox Subject: [PATCH v5 63/78] dax: Convert dax_insert_pfn_mkwrite to XArray Date: Fri, 15 Dec 2017 14:04:35 -0800 Message-ID: <20171215220450.7899-64-willy@infradead.org> References: <20171215220450.7899-1-willy@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from sfi-mx-1.v28.ch3.sourceforge.com ([172.29.28.191] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1ePy73-0007mY-D7 for linux-f2fs-devel@lists.sourceforge.net; Fri, 15 Dec 2017 22:05:49 +0000 Received: from bombadil.infradead.org ([65.50.211.133]) by sfi-mx-1.v28.ch3.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) id 1ePy71-00025s-28 for linux-f2fs-devel@lists.sourceforge.net; Fri, 15 Dec 2017 22:05:49 +0000 In-Reply-To: <20171215220450.7899-1-willy@infradead.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net To: linux-kernel@vger.kernel.org Cc: Jens Axboe , linux-xfs@vger.kernel.org, linux-nilfs@vger.kernel.org, linux-raid@vger.kernel.org, Matthew Wilcox , Marc Zyngier , linux-usb@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, David Howells , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, Ross Zwisler , Rehas Sachdeva , Shaohua Li , linux-btrfs@vger.kernel.org From: Matthew Wilcox Signed-off-by: Matthew Wilcox --- fs/dax.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index d6dd779e1b46..9cfd4fcc0b0d 100644 --- a/fs/dax.c +++ b/fs/dax.c @@ -1498,21 +1498,21 @@ static int dax_insert_pfn_mkwrite(struct vm_fault *vmf, void *entry; int vmf_ret, error; - xa_lock_irq(&mapping->pages); + xas_lock_irq(&xas); entry = get_unlocked_mapping_entry(&xas); /* Did we race with someone splitting entry or so? */ if (!entry || (pe_size == PE_SIZE_PTE && !dax_is_pte_entry(entry)) || (pe_size == PE_SIZE_PMD && !dax_is_pmd_entry(entry))) { put_unlocked_mapping_entry(&xas, entry); - xa_unlock_irq(&mapping->pages); + xas_unlock_irq(&xas); trace_dax_insert_pfn_mkwrite_no_entry(mapping->host, vmf, VM_FAULT_NOPAGE); return VM_FAULT_NOPAGE; } - radix_tree_tag_set(&mapping->pages, index, PAGECACHE_TAG_DIRTY); + xas_set_tag(&xas, PAGECACHE_TAG_DIRTY); entry = lock_slot(&xas); - xa_unlock_irq(&mapping->pages); + xas_unlock_irq(&xas); switch (pe_size) { case PE_SIZE_PTE: error = vm_insert_mixed_mkwrite(vmf->vma, vmf->address, pfn); -- 2.15.1 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot