lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080304200209.1EAB.KOSAKI.MOTOHIRO@jp.fujitsu.com>
Date:	Tue, 04 Mar 2008 20:04:05 +0900
From:	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
To:	Rik van Riel <riel@...hat.com>
Cc:	kosaki.motohiro@...fujitsu.com, Andy Whitcroft <apw@...dowen.org>,
	linux-kernel@...r.kernel.org,
	Lee Schermerhorn <Lee.Schermerhorn@...com>, linux-mm@...ck.org
Subject: Re: [patch 03/21] use an array for the LRU pagevecs

Hi Rik

this is fixed patch of Andy Whitcroft's point out.
(at least, I hope it)



Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>

---
 include/linux/mmzone.h |    4 +---
 mm/swap.c              |   15 +++++++++++----
 2 files changed, 12 insertions(+), 7 deletions(-)

Index: b/include/linux/mmzone.h
===================================================================
--- a/include/linux/mmzone.h	2008-03-04 19:07:11.000000000 +0900
+++ b/include/linux/mmzone.h	2008-03-04 19:09:06.000000000 +0900
@@ -116,9 +116,7 @@ enum lru_list {
 
 static inline int is_active_lru(enum lru_list l)
 {
-	if (l == LRU_ACTIVE)
-		return 1;
-	return 0;
+	return (l == LRU_ACTIVE);
 }
 
 enum lru_list page_lru(struct page *page);
Index: b/mm/swap.c
===================================================================
--- a/mm/swap.c	2008-03-04 19:07:11.000000000 +0900
+++ b/mm/swap.c	2008-03-04 20:01:48.000000000 +0900
@@ -96,8 +96,9 @@ void put_pages_list(struct list_head *pa
 }
 EXPORT_SYMBOL(put_pages_list);
 
-/*
+/**
  * Returns the LRU list a page should be on.
+ * @page: the page we're checking.
  */
 enum lru_list page_lru(struct page *page)
 {
@@ -222,11 +223,15 @@ void __lru_cache_add(struct page *page, 
 	put_cpu_var(lru_add_pvecs);
 }
 
+/**
+ * lru_cache_add_lru: add a page to the page lists
+ * @page: the page to be added to LRU.
+ * @lru:  the lru to which the page is added.
+ */
 void lru_cache_add_lru(struct page *page, enum lru_list lru)
 {
-	if (PageActive(page)) {
+	if (PageActive(page))
 		ClearPageActive(page);
-	}
 
 	VM_BUG_ON(PageLRU(page) || PageActive(page));
 	__lru_cache_add(page, lru);
@@ -397,9 +402,11 @@ void __pagevec_release_nonlru(struct pag
 	pagevec_reinit(pvec);
 }
 
-/*
+/**
  * Add the passed pages to the LRU, then drop the caller's refcount
  * on them.  Reinitialises the caller's pagevec.
+ * @pvec: the pagevec of pages to be added to LRU.
+ * @lru:  the lru to which pages are added.
  */
 void ____pagevec_lru_add(struct pagevec *pvec, enum lru_list lru)
 {


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ