linux-stable/arch/nds32
Mike Rapoport a55eaeff17 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:22:32 +02:00
..
boot nds32: Build infrastructure 2018-02-22 10:44:35 +08:00
configs nds32: defconfig 2018-02-22 10:44:35 +08:00
include nds32: Fix bug in bitfield.h 2019-12-01 09:17:18 +01:00
kernel nds32: Fix the items of hwcap_str ordering issue. 2019-12-13 08:51:35 +01:00
lib nds32: Fix the symbols undefined issue by exporting them. 2018-05-23 13:26:20 +08:00
mm nds32: flush_dcache_page: use page_mapping_file to avoid races with swapoff 2021-04-14 08:22:32 +02:00
Kconfig nds32/ftrace: Support dynamic function tracer 2018-09-04 14:45:18 +08:00
Kconfig.cpu nds32: Fix the allmodconfig build. To make sure CONFIG_CPU_LITTLE_ENDIAN is default y 2018-05-23 13:26:21 +08:00
Kconfig.debug Kconfig: consolidate the "Kernel hacking" menu 2018-08-02 08:06:48 +09:00
Makefile nds32/ftrace: Support static function tracer 2018-09-04 14:45:17 +08:00