提交 9f267a17 编写于 作者: D Dan Carpenter 提交者: Linus Torvalds

khugepaged: selftests: fix timeout condition in wait_for_scan()

The loop exits with "timeout" set to -1 and not to 0 so the test needs to
be fixed.

Fixes: e7b592f6caca ("khugepaged: add self test")
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Zi Yan <ziy@nvidia.com>
Cc: William Kucharski <william.kucharski@oracle.com>
Cc: Yang Shi <yang.shi@linux.alibaba.com>
Cc: John Hubbard <jhubbard@nvidia.com>
Link: http://lkml.kernel.org/r/20200605110736.GH978434@mwandaAcked-by: NKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 6f630784
...@@ -502,7 +502,7 @@ static bool wait_for_scan(const char *msg, char *p) ...@@ -502,7 +502,7 @@ static bool wait_for_scan(const char *msg, char *p)
madvise(p, hpage_pmd_size, MADV_NOHUGEPAGE); madvise(p, hpage_pmd_size, MADV_NOHUGEPAGE);
return !timeout; return timeout == -1;
} }
static void alloc_at_fault(void) static void alloc_at_fault(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册