summaryrefslogtreecommitdiff
path: root/mm/kasan
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2019-09-24 01:34:30 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2019-09-25 01:54:08 +0300
commitd8c6546b1aea843fbeb4d54a1202f1adda6504be (patch)
tree4b0fcc4a1afc9342472d59293b50fce20f2d70e7 /mm/kasan
parent94ad9338109fe9d0b8a4a16828719dd6dcaee4c2 (diff)
downloadlinux-d8c6546b1aea843fbeb4d54a1202f1adda6504be.tar.xz
mm: introduce compound_nr()
Replace 1 << compound_order(page) with compound_nr(page). Minor improvements in readability. Link: http://lkml.kernel.org/r/20190721104612.19120-4-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Ira Weiny <ira.weiny@intel.com> Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Michal Hocko <mhocko@suse.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/kasan')
-rw-r--r--mm/kasan/common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/kasan/common.c b/mm/kasan/common.c
index 307631d9c62b..6814d6d6a023 100644
--- a/mm/kasan/common.c
+++ b/mm/kasan/common.c
@@ -336,7 +336,7 @@ void kasan_poison_slab(struct page *page)
{
unsigned long i;
- for (i = 0; i < (1 << compound_order(page)); i++)
+ for (i = 0; i < compound_nr(page); i++)
page_kasan_tag_reset(page + i);
kasan_poison_shadow(page_address(page), page_size(page),
KASAN_KMALLOC_REDZONE);