This is just a cleanup - no functional changes. Gets a bunch of code
outside an if by returning NULL earlier.
Signed-Off-By: Martin Hicks <
[email protected]>
Signed-off-by: Andrew Morton <
[email protected]>
---
diff -puN mm/page_alloc.c~reiser4-perthread_pages_alloc-cleanup mm/page_alloc.c
mm/page_alloc.c | 21 ++++++++++-----------
1 files changed, 10 insertions(+), 11 deletions(-)
diff -puN mm/page_alloc.c~reiser4-perthread_pages_alloc-cleanup mm/page_alloc.c
--- linux-2.6.11/mm/page_alloc.c~reiser4-perthread_pages_alloc-cleanup 2005-03-25 17:36:19.000000000 +0300
+++ linux-2.6.11-vs/mm/page_alloc.c 2005-03-25 17:36:19.000000000 +0300
@@ -720,6 +720,7 @@ static inline struct page *
perthread_pages_alloc(void)
{
struct list_head *perthread_pages;
+ struct page *page;
/*
* try to allocate pages from the per-thread private_pages pool. No
@@ -727,18 +728,16 @@ perthread_pages_alloc(void)
* itself, and not by interrupts or other threads.
*/
perthread_pages = get_per_thread_pages();
- if (!in_interrupt() && !list_empty(perthread_pages)) {
- struct page *page;
-
- page = list_entry(perthread_pages->next, struct page, lru);
- list_del(&page->lru);
- current->private_pages_count--;
- /*
- * per-thread page is already initialized, just return it.
- */
- return page;
- } else
+ if (in_interrupt() || list_empty(perthread_pages))
return NULL;
+
+ page = list_entry(perthread_pages->next, struct page, lru);
+ list_del(&page->lru);
+ current->private_pages_count--;
+ /*
+ * per-thread page is already initialized, just return it.
+ */
+ return page;
}
/*
_