Skip to content

Commit 02a8efe

Browse files
akpm00torvalds
authored andcommitted
include/linux/mmdebug.h: add VM_WARN_ON() and VM_WARN_ON_ONCE()
WARN_ON() and WARN_ON_ONCE(), dependent on CONFIG_DEBUG_VM Cc: Sebastian Ott <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent ae3a8c1 commit 02a8efe

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/linux/mmdebug.h

+4
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,13 @@ extern void dump_page_badflags(struct page *page, const char *reason,
1111
#define VM_BUG_ON(cond) BUG_ON(cond)
1212
#define VM_BUG_ON_PAGE(cond, page) \
1313
do { if (unlikely(cond)) { dump_page(page, NULL); BUG(); } } while (0)
14+
#define VM_WARN_ON(cond) WARN_ON(cond)
15+
#define VM_WARN_ON_ONCE(cond) WARN_ON_ONCE(cond)
1416
#else
1517
#define VM_BUG_ON(cond) BUILD_BUG_ON_INVALID(cond)
1618
#define VM_BUG_ON_PAGE(cond, page) VM_BUG_ON(cond)
19+
#define VM_WARN_ON(cond) BUILD_BUG_ON_INVALID(cond)
20+
#define VM_WARN_ON_ONCE(cond) BUILD_BUG_ON_INVALID(cond)
1721
#endif
1822

1923
#ifdef CONFIG_DEBUG_VIRTUAL

0 commit comments

Comments
 (0)