<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">
From: Martin Hicks &lt;mort@wildopensource.com&gt;

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 &lt;mort@wildopensource.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
---

 25-akpm/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
--- 25/mm/page_alloc.c~reiser4-perthread_pages_alloc-cleanup	2005-02-28 17:02:32.000000000 -0800
+++ 25-akpm/mm/page_alloc.c	2005-02-28 17:02:32.000000000 -0800
@@ -714,6 +714,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
@@ -721,18 +722,16 @@ perthread_pages_alloc(void)
 	 * itself, and not by interrupts or other threads.
 	 */
 	perthread_pages = get_per_thread_pages();
-	if (!in_interrupt() &amp;&amp; !list_empty(perthread_pages)) {
-		struct page *page;
-
-		page = list_entry(perthread_pages-&gt;next, struct page, lru);
-		list_del(&amp;page-&gt;lru);
-		current-&gt;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-&gt;next, struct page, lru);
+	list_del(&amp;page-&gt;lru);
+	current-&gt;private_pages_count--;
+	/*
+	 * per-thread page is already initialized, just return it.
+	 */
+	return page;
 }
 
 /*
_
</pre></body></html>