From f598fb8d97c017bd343a75a3fe906e7d45918d5e Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Mon, 19 Jan 2004 05:13:35 -0800 Subject: [PATCH] if ... BUG() -> BUG_ON() From: Adrian Bunk four months ago, Rolf Eike Beer sent a patch against 2.6.0-test5-bk1 that converted several if ... BUG() to BUG_ON() This might in some cases result in slightly faster code because BUG_ON() uses unlikely(). --- include/linux/buffer_head.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include/linux/buffer_head.h') diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 5f4b675a7bb4..110584f07883 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h @@ -125,8 +125,7 @@ BUFFER_FNS(Write_EIO,write_io_error) /* If we *know* page->private refers to buffer_heads */ #define page_buffers(page) \ ({ \ - if (!PagePrivate(page)) \ - BUG(); \ + BUG_ON(!PagePrivate(page)); \ ((struct buffer_head *)(page)->private); \ }) #define page_has_buffers(page) PagePrivate(page) -- cgit v1.2.3