Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4114370imm; Mon, 11 Jun 2018 07:14:17 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIO3X+NSkxNY1xSi0WPbD5e392UMvPQB3nmUWzEqmFBsQVIJ0e4IgrW4xU8RNyV/ZDNCM0r X-Received: by 2002:a62:a09c:: with SMTP id p28-v6mr17911415pfl.9.1528726457139; Mon, 11 Jun 2018 07:14:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528726457; cv=none; d=google.com; s=arc-20160816; b=xrf1cu2X4u1dgoTm0pQBrU6Q7w9RV5iOhJUCXheB5cMmKqr9Z7PkworBHN+gw2pd4F O+1/Aw5aoFCEAzMRHQchPa+d3oh0HnrNlzfPdQHp7VLojFfc2m5/Dy+qgij8tjGi/m85 f7FWRmcHBZYC82OEkSYVLSp/ouN8s5pksI0ckVcOYfzkuwrsm01eF6DmC6QgDtvEOaOg EWqRIQGiKBlWHDZ+R1F7RvJLCAf8Dfw8TRLpkDpGZARZzFFp8xEm5YWGLb+CavaQnUrz UtYldMxCwGpz4Z/TdqFSKAIW3abNEih4gFz4XFIE8GCn7m3Aq2uKONlBADqZBoX88aFY W/Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=shTCii8XN3GaoHud7h6kduHJWwZn5c2W4msLECbUBQ8=; b=AmG8zugple3/FOq3QAqJ11vNkBPsoTdVzsBfrnprk42mSd3u5M8Zh3bZ4ZahcSbXn7 WN4S5EZbcYvi+16X/9MmLHOBHrRT9Z1dfP6OkhhsLUwm4kw9xwOakaqHfUXoUpVbuGuS SikA+XhJUpHzZZZ8++eStNz2s7OAPKecF84PFfSL5r3rOy5nWZnmJMmetzUd02FdSo5n U1IV+p6xz6A9Bm3WuEHXwM1iomcakwf+fpsFmtyQHMulrL2TXi86DryU5ROewTTRG+YT bNkrywc5P7FFlMcYzcD5N3pvApDWiDTaOACbmt830MmW64fKFJ9EDX1VfZR7ML22HfGK AvMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=qaqyTOZa; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b37-v6si64219847plb.377.2018.06.11.07.14.02; Mon, 11 Jun 2018 07:14:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=qaqyTOZa; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933942AbeFKOLk (ORCPT + 99 others); Mon, 11 Jun 2018 10:11:40 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:46480 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933404AbeFKOHK (ORCPT ); Mon, 11 Jun 2018 10:07:10 -0400 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=shTCii8XN3GaoHud7h6kduHJWwZn5c2W4msLECbUBQ8=; b=qaqyTOZa8VV5F24xAEN/p0VqJ 8pz7p9vrjV+Hm73Sc+0kCD3uYoLjMmA3he5tn2y7ZgcqT0T6b+bN17nN198rjfLBJfmVxTvM020xi V9cYnDAl9vhkBWrtGiFlMZed+i+N20oFrFf+qrksvHPwa3VLncNkvS+Yqmejt1Skr+j5Jo7mdp9kS K3ZIOcnb530aBKd/YrOqtKC/pokoPCAzJ+GCh9Jr1VLFEEVCEI1vHNohk6c7dBHOwjL1Km+I4tiE4 OCEgBa7Th99FU3uNSAQgkdImMsaL8LcOn2/pNpsxbz0GnwonnMSFnJJ27n8HSGksHk0ADp+VIlczu G6ssNnbpQ==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fSNTR-0004zP-8F; Mon, 11 Jun 2018 14:07:09 +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 60/72] f2fs: Convert to XArray Date: Mon, 11 Jun 2018 07:06:27 -0700 Message-Id: <20180611140639.17215-61-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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Matthew Wilcox This is a straightforward conversion. Signed-off-by: Matthew Wilcox --- fs/f2fs/data.c | 4 ++-- fs/f2fs/dir.c | 2 +- fs/f2fs/f2fs.h | 2 +- fs/f2fs/inline.c | 2 +- fs/f2fs/node.c | 6 ++---- 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index e5c0b1e74ce6..b274300995cd 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -2600,13 +2600,13 @@ const struct address_space_operations f2fs_dblock_aops = { #endif }; -void f2fs_clear_radix_tree_dirty_tag(struct page *page) +void f2fs_clear_page_cache_dirty_tag(struct page *page) { struct address_space *mapping = page_mapping(page); unsigned long flags; xa_lock_irqsave(&mapping->i_pages, flags); - radix_tree_tag_clear(&mapping->i_pages, page_index(page), + __xa_clear_tag(&mapping->i_pages, page_index(page), PAGECACHE_TAG_DIRTY); xa_unlock_irqrestore(&mapping->i_pages, flags); } diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c index 7f955c4e86a4..9c2a23242f64 100644 --- a/fs/f2fs/dir.c +++ b/fs/f2fs/dir.c @@ -730,7 +730,7 @@ void f2fs_delete_entry(struct f2fs_dir_entry *dentry, struct page *page, if (bit_pos == NR_DENTRY_IN_BLOCK && !f2fs_truncate_hole(dir, page->index, page->index + 1)) { - f2fs_clear_radix_tree_dirty_tag(page); + f2fs_clear_page_cache_dirty_tag(page); clear_page_dirty_for_io(page); ClearPagePrivate(page); ClearPageUptodate(page); diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 4d8b1de83143..1f71ab2ddad9 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -2973,7 +2973,7 @@ int f2fs_migrate_page(struct address_space *mapping, struct page *newpage, struct page *page, enum migrate_mode mode); #endif bool f2fs_overwrite_io(struct inode *inode, loff_t pos, size_t len); -void f2fs_clear_radix_tree_dirty_tag(struct page *page); +void f2fs_clear_page_cache_dirty_tag(struct page *page); /* * gc.c diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c index 043830be5662..48f40d344a2a 100644 --- a/fs/f2fs/inline.c +++ b/fs/f2fs/inline.c @@ -226,7 +226,7 @@ int f2fs_write_inline_data(struct inode *inode, struct page *page) kunmap_atomic(src_addr); set_page_dirty(dn.inode_page); - f2fs_clear_radix_tree_dirty_tag(page); + f2fs_clear_page_cache_dirty_tag(page); set_inode_flag(inode, FI_APPEND_WRITE); set_inode_flag(inode, FI_DATA_EXIST); diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 47d0e64a95a8..44f3974fddf4 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -103,7 +103,7 @@ bool f2fs_available_free_memory(struct f2fs_sb_info *sbi, int type) static void clear_node_page_dirty(struct page *page) { if (PageDirty(page)) { - f2fs_clear_radix_tree_dirty_tag(page); + f2fs_clear_page_cache_dirty_tag(page); clear_page_dirty_for_io(page); dec_page_count(F2FS_P_SB(page), F2FS_DIRTY_NODES); } @@ -1168,9 +1168,7 @@ void f2fs_ra_node_page(struct f2fs_sb_info *sbi, nid_t nid) if (f2fs_check_nid_range(sbi, nid)) return; - rcu_read_lock(); - apage = radix_tree_lookup(&NODE_MAPPING(sbi)->i_pages, nid); - rcu_read_unlock(); + apage = xa_load(&NODE_MAPPING(sbi)->i_pages, nid); if (apage) return; -- 2.17.1