Rev 378 | Rev 381 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 378 | Rev 379 | ||
---|---|---|---|
Line 160... | Line 160... | ||
160 | */ |
160 | */ |
161 | i = b->op->get_order(block); |
161 | i = b->op->get_order(block); |
162 | 162 | ||
163 | ASSERT(i < b->max_order); |
163 | ASSERT(i < b->max_order); |
164 | 164 | ||
- | 165 | if (i != b->max_order - 1) { |
|
165 | /* |
166 | /* |
166 | * See if there is any buddy in the list of order i. |
167 | * See if there is any buddy in the list of order i. |
167 | */ |
168 | */ |
168 | buddy = b->op->find_buddy(block); |
169 | buddy = b->op->find_buddy(block); |
169 | - | ||
170 | if (buddy && i != b->max_order - 1) { |
170 | if (buddy) { |
171 | 171 | ||
172 | ASSERT(b->op->get_order(buddy) == i); |
172 | ASSERT(b->op->get_order(buddy) == i); |
173 | 173 | ||
174 | /* |
174 | /* |
175 | * Remove buddy from the list of order i. |
175 | * Remove buddy from the list of order i. |
Line 194... | Line 194... | ||
194 | 194 | ||
195 | /* |
195 | /* |
196 | * Recursively add the coalesced block to the list of order i + 1. |
196 | * Recursively add the coalesced block to the list of order i + 1. |
197 | */ |
197 | */ |
198 | buddy_system_free(b, hlp); |
198 | buddy_system_free(b, hlp); |
- | 199 | return; |
|
- | 200 | } |
|
199 | } |
201 | } |
200 | else { |
202 | |
201 | /* |
203 | /* |
202 | * Insert block into the list of order i. |
204 | * Insert block into the list of order i. |
203 | */ |
205 | */ |
204 | list_append(block, &b->order[i]); |
206 | list_append(block, &b->order[i]); |
205 | } |
- | |
206 | 207 | ||
207 | } |
208 | } |