Skip to content

Commit

Permalink
crypto: scatterwalk - Avoid flush_dcache_page on slab pages
Browse files Browse the repository at this point in the history
It's illegal to call flush_dcache_page on slab pages on a number
of architectures.  So this patch avoids doing so if PageSlab is
true.

In future we can move the flush_dcache_page call to those page
cache users that actually need it.

Reported-by: David S. Miller <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
herbertx committed Feb 9, 2009
1 parent 412e87a commit 4f3e797
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crypto/scatterwalk.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ static void scatterwalk_pagedone(struct scatter_walk *walk, int out,
struct page *page;

page = sg_page(walk->sg) + ((walk->offset - 1) >> PAGE_SHIFT);
flush_dcache_page(page);
if (!PageSlab(page))
flush_dcache_page(page);
}

if (more) {
Expand Down

0 comments on commit 4f3e797

Please sign in to comment.