linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] try_to_unuse : remove redundant swap_count()
@ 2009-10-20  7:09 Bo Liu
  2009-10-20 12:06 ` KAMEZAWA Hiroyuki
  0 siblings, 1 reply; 7+ messages in thread
From: Bo Liu @ 2009-10-20  7:09 UTC (permalink / raw)
  To: akpm; +Cc: hugh.dickins, linux-mm


 
While comparing with swcount,it's no need to
call swap_count(). Just as int set_start_mm = 
(*swap_map>= swcount) is ok.
 
Signed-off-by: Bo Liu <bo-liu@hotmail.com>
---
 
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 63ce10f..2456fc6 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -1152,7 +1152,7 @@ static int try_to_unuse(unsigned int type)
      retval = unuse_mm(mm, entry, page);
     if (set_start_mm &&
-        swap_count(*swap_map) < swcount) {
+         ((*swap_map) < swcount)) {
      mmput(new_start_mm);
      atomic_inc(&mm->mm_users);
      new_start_mm = mm;
 
-- 
1.6.0.6 		 	   		  
_________________________________________________________________
Windows Live Hotmail: Your friends can get your Facebook updates, right from Hotmail®.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_4:092009
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-10-28 23:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-20  7:09 [PATCH] try_to_unuse : remove redundant swap_count() Bo Liu
2009-10-20 12:06 ` KAMEZAWA Hiroyuki
2009-10-21  1:12   ` Bo Liu
2009-10-21  1:25   ` Bob Liu
2009-10-28 20:31     ` Hugh Dickins
2009-10-28 20:34       ` [PATCH] mm: remove incorrect swap_count() from try_to_unuse() Hugh Dickins
2009-10-28 23:38         ` KAMEZAWA Hiroyuki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).