[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210330171452.GO351017@casper.infradead.org>
Date: Tue, 30 Mar 2021 18:14:52 +0100
From: Matthew Wilcox <willy@...radead.org>
To: Mike Rapoport <rppt@...ux.ibm.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
Huang Ying <ying.huang@...el.com>,
Mike Rapoport <rppt@...ux.vnet.ibm.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] mm: Move page_mapping_file to pagemap.h
On Tue, Mar 30, 2021 at 08:11:19PM +0300, Mike Rapoport wrote:
> On Wed, Mar 17, 2021 at 12:30:11PM +0000, Matthew Wilcox (Oracle) wrote:
> > page_mapping_file() is only used by some architectures, and then it
> > is usually only used in one place. Make it a static inline function
> > so other architectures don't have to carry this dead code.
>
> As the original commit that replaced page_mapping() with
> page_mapping_file() [cb9f753a3731 ("mm: fix races between swapoff and flush
> dcache")] missed arch/nds32 I think it'll make sense to add the below hunk
> to this patch:
>
> diff --git a/arch/nds32/mm/cacheflush.c b/arch/nds32/mm/cacheflush.c
> index 6eb98a7ad27d..ad5344ef5d33 100644
> --- a/arch/nds32/mm/cacheflush.c
> +++ b/arch/nds32/mm/cacheflush.c
> @@ -238,7 +238,7 @@ void flush_dcache_page(struct page *page)
> {
> struct address_space *mapping;
>
> - mapping = page_mapping(page);
> + mapping = page_mapping_file(page);
> if (mapping && !mapping_mapped(mapping))
> set_bit(PG_dcache_dirty, &page->flags);
> else {
Good catch, but it's its own distinct problem, so I'd make it a separate
patch.
Powered by blists - more mailing lists