aboutsummaryrefslogtreecommitdiffstats
path: root/mm/swap_state.c
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-03-31 18:25:12 -0500
committerAdrian Bunk <bunk@stusta.de>2006-03-31 18:25:12 -0500
commite74ca2b49b8a38e9ba0bc039a00498c21140f1d6 (patch)
tree6700884d9dea7d382d09abd9b79ea931390f3ccc /mm/swap_state.c
parent46a350ef9803a2526a128c55cdb27dd73b2ad966 (diff)
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)
148 swp_entry_t entry; 148 swp_entry_t entry;
149 int err; 149 int err;
150 150
151 if (!PageLocked(page)) 151 BUG_ON(!PageLocked(page));
152 BUG();
153 152
154 for (;;) { 153 for (;;) {
155 entry = get_swap_page(); 154 entry = get_swap_page();