Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

memory-failure: remove calls to page_mapping()

This is mostly just inlining page_mapping() into the two callers.

Link: https://lkml.kernel.org/r/20240423225552.4113447-4-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Acked-by: Miaohe Lin <linmiaohe@huawei.com>
Cc: Eric Biggers <ebiggers@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Matthew Wilcox (Oracle) and committed by
Andrew Morton
89f5c54b 196ad49c

+4 -2
+4 -2
mm/memory-failure.c
··· 216 216 217 217 static int hwpoison_filter_dev(struct page *p) 218 218 { 219 + struct folio *folio = page_folio(p); 219 220 struct address_space *mapping; 220 221 dev_t dev; 221 222 ··· 224 223 hwpoison_filter_dev_minor == ~0U) 225 224 return 0; 226 225 227 - mapping = page_mapping(p); 226 + mapping = folio_mapping(folio); 228 227 if (mapping == NULL || mapping->host == NULL) 229 228 return -EINVAL; 230 229 ··· 1091 1090 */ 1092 1091 static int me_pagecache_dirty(struct page_state *ps, struct page *p) 1093 1092 { 1094 - struct address_space *mapping = page_mapping(p); 1093 + struct folio *folio = page_folio(p); 1094 + struct address_space *mapping = folio_mapping(folio); 1095 1095 1096 1096 SetPageError(p); 1097 1097 /* TBD: print more information about the file. */