linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Mike Rapoport <rppt@linux.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, Huang Ying <ying.huang@intel.com>,
	Mike Rapoport <rppt@linux.vnet.ibm.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] mm: Move page_mapping_file to pagemap.h
Date: Tue, 30 Mar 2021 18:14:52 +0100	[thread overview]
Message-ID: <20210330171452.GO351017@casper.infradead.org> (raw)
In-Reply-To: <YGNbt87KmByKVs0P@linux.ibm.com>

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.


      reply	other threads:[~2021-03-30 17:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-17 12:30 Matthew Wilcox (Oracle)
2021-03-17 13:20 ` David Hildenbrand
2021-03-17 14:17 ` Mike Rapoport
2021-03-30 17:11 ` Mike Rapoport
2021-03-30 17:14   ` Matthew Wilcox [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210330171452.GO351017@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rppt@linux.ibm.com \
    --cc=rppt@linux.vnet.ibm.com \
    --cc=ying.huang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox