Skip to content

Commit 0e84f5d

Browse files
Christoph Hellwigtorvalds
authored andcommitted
scatterlist: replace flush_kernel_dcache_page with flush_dcache_page
Pages used in scatterlist can be mapped page cache pages (and often are), so we must use flush_dcache_page here instead of the more limited flush_kernel_dcache_page that is intended for highmem pages only. Also remove the PageSlab check given that page_mapping_file as used by the flush_dcache_page implementations already contains that check. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Christoph Hellwig <[email protected]> Acked-by: Linus Torvalds <[email protected]> Cc: Alex Shi <[email protected]> Cc: Geoff Levand <[email protected]> Cc: Greentime Hu <[email protected]> Cc: Guo Ren <[email protected]> Cc: Helge Deller <[email protected]> Cc: "James E.J. Bottomley" <[email protected]> Cc: Nick Hu <[email protected]> Cc: Paul Cercueil <[email protected]> Cc: Rich Felker <[email protected]> Cc: Russell King <[email protected]> Cc: Thomas Bogendoerfer <[email protected]> Cc: Ulf Hansson <[email protected]> Cc: Vincent Chen <[email protected]> Cc: Yoshinori Sato <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 64a05fe commit 0e84f5d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/scatterlist.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -887,9 +887,8 @@ void sg_miter_stop(struct sg_mapping_iter *miter)
887887
miter->__offset += miter->consumed;
888888
miter->__remaining -= miter->consumed;
889889

890-
if ((miter->__flags & SG_MITER_TO_SG) &&
891-
!PageSlab(miter->page))
892-
flush_kernel_dcache_page(miter->page);
890+
if (miter->__flags & SG_MITER_TO_SG)
891+
flush_dcache_page(miter->page);
893892

894893
if (miter->__flags & SG_MITER_ATOMIC) {
895894
WARN_ON_ONCE(preemptible());

0 commit comments

Comments
 (0)