Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c1e98bf2 authored by Sami Tolvanen's avatar Sami Tolvanen
Browse files

ANDROID: mm: fix filler function type mismatch



Bug: 67506682
Change-Id: I6f615164ccd86b407540ada9bbcb39d910395db9
Signed-off-by: default avatarSami Tolvanen <samitolvanen@google.com>
parent 8c7bbeac
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -243,7 +243,7 @@ static inline gfp_t readahead_gfp_mask(struct address_space *x)
				  __GFP_COLD | __GFP_NORETRY | __GFP_NOWARN;
}

typedef int filler_t(void *, struct page *);
typedef int filler_t(struct file *, struct page *);

pgoff_t page_cache_next_hole(struct address_space *mapping,
			     pgoff_t index, unsigned long max_scan);
@@ -394,7 +394,7 @@ extern int read_cache_pages(struct address_space *mapping,
static inline struct page *read_mapping_page(struct address_space *mapping,
				pgoff_t index, void *data)
{
	filler_t *filler = (filler_t *)mapping->a_ops->readpage;
	filler_t *filler = mapping->a_ops->readpage;
	return read_cache_page(mapping, index, filler, data);
}

+3 −3
Original line number Diff line number Diff line
@@ -2665,7 +2665,7 @@ static struct page *wait_on_page_read(struct page *page)

static struct page *do_read_cache_page(struct address_space *mapping,
				pgoff_t index,
				int (*filler)(void *, struct page *),
				int (*filler)(struct file *, struct page *),
				void *data,
				gfp_t gfp)
{
@@ -2772,7 +2772,7 @@ static struct page *do_read_cache_page(struct address_space *mapping,
 */
struct page *read_cache_page(struct address_space *mapping,
				pgoff_t index,
				int (*filler)(void *, struct page *),
				int (*filler)(struct file *, struct page *),
				void *data)
{
	return do_read_cache_page(mapping, index, filler, data, mapping_gfp_mask(mapping));
@@ -2794,7 +2794,7 @@ struct page *read_cache_page_gfp(struct address_space *mapping,
				pgoff_t index,
				gfp_t gfp)
{
	filler_t *filler = (filler_t *)mapping->a_ops->readpage;
	filler_t *filler = mapping->a_ops->readpage;

	return do_read_cache_page(mapping, index, filler, NULL, gfp);
}
+1 −1
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ static void read_cache_pages_invalidate_pages(struct address_space *mapping,
 * Hides the details of the LRU cache etc from the filesystems.
 */
int read_cache_pages(struct address_space *mapping, struct list_head *pages,
			int (*filler)(void *, struct page *), void *data)
			int (*filler)(struct file *, struct page *), void *data)
{
	struct page *page;
	int ret = 0;