Thread (106 messages) 106 messages, 6 authors, 2022-01-08

Re: [PATCH 25/48] filemap: Add read_cache_folio and read_mapping_folio

From: Christoph Hellwig <hch@infradead.org>
Date: 2021-12-23 07:40:07
Also in: linux-fsdevel

thn makes up for the extra 100 bytes of text added to the various
s/thn/
 	return read_cache_page(mapping, index, NULL, data);
 }
 
+static inline struct folio *read_mapping_folio(struct address_space *mapping,
+				pgoff_t index, void *data)
+{
+	return read_cache_folio(mapping, index, NULL, data);
+}
Is there much of a point in this wrapper?
+static struct page *do_read_cache_page(struct address_space *mapping,
+		pgoff_t index, filler_t *filler, void *data, gfp_t gfp)
+{
+	struct folio *folio = read_cache_folio(mapping, index, filler, data);
+	if (IS_ERR(folio))
+		return &folio->page;
+	return folio_file_page(folio, index);
+}
This drops the gfp on the floor.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help