[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230307143410.28031-2-hch@lst.de>
Date: Tue, 7 Mar 2023 15:34:04 +0100
From: Christoph Hellwig <hch@....de>
To: Andrew Morton <akpm@...ux-foundation.org>,
Matthew Wilcox <willy@...radead.org>,
Hugh Dickins <hughd@...gle.com>
Cc: linux-afs@...ts.infradead.org, linux-btrfs@...r.kernel.org,
linux-ext4@...r.kernel.org, cluster-devel@...hat.com,
linux-mm@...ck.org, linux-xfs@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-nilfs@...r.kernel.org
Subject: [PATCH 1/7] mm: don't look at xarray value entries in split_huge_pages_in_file
split_huge_pages_in_file never wants to do anything with the special
value enties. Switch to using filemap_get_folio to not even see them.
Signed-off-by: Christoph Hellwig <hch@....de>
Reviewed-by: Matthew Wilcox (Oracle) <willy@...radead.org>
---
mm/huge_memory.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 4fc43859e59a31..62843afeb7946d 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -3090,11 +3090,10 @@ static int split_huge_pages_in_file(const char *file_path, pgoff_t off_start,
mapping = candidate->f_mapping;
for (index = off_start; index < off_end; index += nr_pages) {
- struct folio *folio = __filemap_get_folio(mapping, index,
- FGP_ENTRY, 0);
+ struct folio *folio = filemap_get_folio(mapping, index);
nr_pages = 1;
- if (xa_is_value(folio) || !folio)
+ if (!folio)
continue;
if (!folio_test_large(folio))
--
2.39.1
Powered by blists - more mailing lists