Message ID | 20240423225552.4113447-3-willy@infradead.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Remove page_mapping() | expand |
On 24.04.24 00:55, Matthew Wilcox (Oracle) wrote: > Removes uses of page_mapping() and page_index(). > > Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> > --- > fs/f2fs/data.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c > index 5d641fac02ba..9f74c867d790 100644 > --- a/fs/f2fs/data.c > +++ b/fs/f2fs/data.c > @@ -4100,11 +4100,12 @@ const struct address_space_operations f2fs_dblock_aops = { > > void f2fs_clear_page_cache_dirty_tag(struct page *page) > { > - struct address_space *mapping = page_mapping(page); > + struct folio *folio = page_folio(page); > + struct address_space *mapping = folio->mapping; > unsigned long flags; > > xa_lock_irqsave(&mapping->i_pages, flags); > - __xa_clear_mark(&mapping->i_pages, page_index(page), > + __xa_clear_mark(&mapping->i_pages, folio->index, > PAGECACHE_TAG_DIRTY); > xa_unlock_irqrestore(&mapping->i_pages, flags); > } Reviewed-by: David Hildenbrand <david@redhat.com>
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 5d641fac02ba..9f74c867d790 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -4100,11 +4100,12 @@ const struct address_space_operations f2fs_dblock_aops = { void f2fs_clear_page_cache_dirty_tag(struct page *page) { - struct address_space *mapping = page_mapping(page); + struct folio *folio = page_folio(page); + struct address_space *mapping = folio->mapping; unsigned long flags; xa_lock_irqsave(&mapping->i_pages, flags); - __xa_clear_mark(&mapping->i_pages, page_index(page), + __xa_clear_mark(&mapping->i_pages, folio->index, PAGECACHE_TAG_DIRTY); xa_unlock_irqrestore(&mapping->i_pages, flags); }
Removes uses of page_mapping() and page_index(). Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> --- fs/f2fs/data.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)