WSL2-Linux-Kernel/arch/nds32/mm
Mike Rapoport a3a8833dff nds32: flush_dcache_page: use page_mapping_file to avoid races with swapoff
Commit cb9f753a37 ("mm: fix races between swapoff and flush dcache")
updated flush_dcache_page implementations on several architectures to
use page_mapping_file() in order to avoid races between page_mapping()
and swapoff().

This update missed arch/nds32 and there is a possibility of a race
there.

Replace page_mapping() with page_mapping_file() in nds32 implementation
of flush_dcache_page().

Link: https://lkml.kernel.org/r/20210330175126.26500-1-rppt@kernel.org
Fixes: cb9f753a37 ("mm: fix races between swapoff and flush dcache")
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Greentime Hu <green.hu@gmail.com>
Cc: Huang Ying <ying.huang@intel.com>
Cc: Nick Hu <nickhu@andestech.com>
Cc: Vincent Chen <deanbo422@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-04-09 14:54:23 -07:00
..
Makefile nds32/mm/highmem: Switch to generic kmap atomic 2020-11-06 23:14:57 +01:00
alignment.c uaccess: add force_uaccess_{begin,end} helpers 2020-08-12 10:57:59 -07:00
cacheflush.c nds32: flush_dcache_page: use page_mapping_file to avoid races with swapoff 2021-04-09 14:54:23 -07:00
extable.c nds32: MMU fault handling and page table management 2018-02-22 10:44:31 +08:00
fault.c mm/nds32: use general page fault accounting 2020-08-12 10:58:03 -07:00
init.c mm: pgtable: add shortcuts for accessing kernel PMD and PTE 2020-06-09 09:39:13 -07:00
mm-nds32.c mm: memcontrol: account pagetables per node 2020-12-15 12:13:40 -08:00
mmap.c nds32: MMU fault handling and page table management 2018-02-22 10:44:31 +08:00
proc.c mm: pgtable: add shortcuts for accessing kernel PMD and PTE 2020-06-09 09:39:13 -07:00
tlb.c nds32: Cache and TLB routines 2018-02-22 10:44:32 +08:00