diff options
author | Kirill A. Shutemov <kirill.shutemov@linux.intel.com> | 2023-03-15 14:31:30 +0300 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-04-05 19:42:45 -0700 |
commit | 668a89907c6b908c4a72ef22e70bbc95efca2000 (patch) | |
tree | e75a8efd340519c1a35e6d9b8df84592a4b38c0d | |
parent | 934487e98fdd2d7762e893af7cbe788cfd39ff84 (diff) | |
download | lwn-668a89907c6b908c4a72ef22e70bbc95efca2000.tar.gz lwn-668a89907c6b908c4a72ef22e70bbc95efca2000.zip |
mm/page_reporting: fix MAX_ORDER usage in page_reporting_register()
MAX_ORDER is not inclusive: the maximum allocation order buddy allocator
can deliver is MAX_ORDER-1.
Fix MAX_ORDER usage in page_reporting_register().
Link: https://lkml.kernel.org/r/20230315113133.11326-8-kirill.shutemov@linux.intel.com
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r-- | mm/page_reporting.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/page_reporting.c b/mm/page_reporting.c index c65813a9dc78..275b466de37b 100644 --- a/mm/page_reporting.c +++ b/mm/page_reporting.c @@ -370,7 +370,7 @@ int page_reporting_register(struct page_reporting_dev_info *prdev) */ if (page_reporting_order == -1) { - if (prdev->order > 0 && prdev->order <= MAX_ORDER) + if (prdev->order > 0 && prdev->order < MAX_ORDER) page_reporting_order = prdev->order; else page_reporting_order = pageblock_order; |