summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-04-01 01:25:12 +0200
committerAdrian Bunk <bunk@stusta.de>2006-04-01 01:25:12 +0200
commite74ca2b49b8a38e9ba0bc039a00498c21140f1d6 (patch)
tree6700884d9dea7d382d09abd9b79ea931390f3ccc /mm
parent46a350ef9803a2526a128c55cdb27dd73b2ad966 (diff)
downloadlinux-e74ca2b49b8a38e9ba0bc039a00498c21140f1d6.tar.bz2
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')
-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();