summaryrefslogtreecommitdiff
path: root/mm/swap_state.c
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-04-01 03:25:12 +0400
committerAdrian Bunk <bunk@stusta.de>2006-04-01 03:25:12 +0400
commite74ca2b49b8a38e9ba0bc039a00498c21140f1d6 (patch)
tree6700884d9dea7d382d09abd9b79ea931390f3ccc /mm/swap_state.c
parent46a350ef9803a2526a128c55cdb27dd73b2ad966 (diff)
downloadlinux-e74ca2b49b8a38e9ba0bc039a00498c21140f1d6.tar.xz
BUG_ON() Conversion in mm/swap_state.c
this changes if() BUG(); constructs to BUG_ON() which is cleaner, contains unlikely() and can better optimized away. Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'mm/swap_state.c')
-rw-r--r--mm/swap_state.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/swap_state.c b/mm/swap_state.c
index d7af296833fc..e0e1583f32c2 100644
--- a/mm/swap_state.c
+++ b/mm/swap_state.c
@@ -148,8 +148,7 @@ int add_to_swap(struct page * page, gfp_t gfp_mask)
swp_entry_t entry;
int err;
- if (!PageLocked(page))
- BUG();
+ BUG_ON(!PageLocked(page));
for (;;) {
entry = get_swap_page();