linux-stable/arch/nds32
Mike Rapoport 4fabcf2294 nds32: flush_dcache_page: use page_mapping_file to avoid races with swapoff
commit a3a8833dff upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-14 08:41:58 +02:00
..
boot nds32: remove unneeded clean-files for DTB 2019-11-21 16:03:27 +08:00
configs kbuild: add CONFIG_HEADERS_INSTALL and loosen the dependency of samples 2019-06-15 19:57:01 +09:00
include local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
kernel arch-cleanup-2020-10-22 2020-10-23 10:06:38 -07:00
lib treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
math-emu nds32 patches for 5.2-rc3 2019-06-03 10:23:41 -07:00
mm nds32: flush_dcache_page: use page_mapping_file to avoid races with swapoff 2021-04-14 08:41:58 +02:00
Kconfig uaccess: add infrastructure for kernel builds with set_fs() 2020-09-08 22:21:32 -04:00
Kconfig.cpu nds32: Fix typo in Kconfig.cpu 2019-11-21 16:05:07 +08:00
Kconfig.debug treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile kconfig: make arch/*/configs/defconfig the default of KBUILD_DEFCONFIG 2019-06-09 15:08:18 +09:00