nds32: flush_dcache_page: use page_mapping_file to avoid races with swapoff
PATCH 1/1 nds32: flush_dcache_page: use page_mapping_file to avoid races with swapoff
From: Mike Rapoport <[email protected]>
Commit cb9f753a3731 ("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().
--- arch/nds32/mm/cacheflush.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/nds32/mm/cacheflush.c +1 -1
@@ -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 {
Signature · 1 line
2.28.0
Quoted 7 lines · Mike Rapoport
From: Mike Rapoport <[email protected]>
Commit
cb9f753a3731("mm: fix races between swapoff and flush dcache") updatedflush_dcache_pageimplementations on several architectures to usepage_mapping_file()in order to avoid races betweenpage_mapping()andswapoff().
Quoted 7 lines
This update missed
arch/nds32and there is a possibility of a race there.Replace
page_mapping()withpage_mapping_file()in nds32 implementation offlush_dcache_page().Fixes cb9f753a3731 ("mm: fix races between swapoff and flush dcache")Signed-off-by Mike Rapoport <[email protected]>
Greentime Hu
Acked-byMatthew Wilcox <[email protected]> 於 2021年3月31日 週三 上午2:14寫道:
Quoted 11 lines · Mike Rapoport
Quoted 9 lines
From: Mike Rapoport <[email protected]>
Commit
cb9f753a3731("mm: fix races between swapoff and flush dcache") updatedflush_dcache_pageimplementations on several architectures to usepage_mapping_file()in order to avoid races betweenpage_mapping()andswapoff().This update missed
arch/nds32and there is a possibility of a race there.
Quoted 7 lines
Quoted 5 lines
Replace
page_mapping()withpage_mapping_file()in nds32 implementation offlush_dcache_page().Fixes cb9f753a3731 ("mm: fix races between swapoff and flush dcache")Signed-off-by Mike Rapoport <[email protected]>Reviewed-by Matthew Wilcox (Oracle) <[email protected]>
Greentime Hu
Acked-byGreentime Hu <[email protected]> 於 2021年3月31日 週三 下午3:30寫道:
Quoted 16 lines
Matthew Wilcox <[email protected]> 於 2021年3月31日 週三 上午2:14寫道:
Quoted 14 lines · Mike Rapoport
Quoted 12 lines
From: Mike Rapoport <[email protected]>
Commit
cb9f753a3731("mm: fix races between swapoff and flush dcache") updatedflush_dcache_pageimplementations on several architectures to usepage_mapping_file()in order to avoid races betweenpage_mapping()andswapoff().This update missed
arch/nds32and there is a possibility of a race there.Replace
page_mapping()withpage_mapping_file()in nds32 implementation offlush_dcache_page().
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Fixes cb9f753a3731 ("mm: fix races between swapoff and flush dcache")Signed-off-by Mike Rapoport <[email protected]>Reviewed-by Matthew Wilcox (Oracle) <[email protected]>Acked-by Greentiime Hu <[email protected]>
Typo.