patch-2.4.5 linux/mm/oom_kill.c

Next file: linux/mm/page_alloc.c
Previous file: linux/mm/mmap.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.4/linux/mm/oom_kill.c linux/mm/oom_kill.c
@@ -191,8 +191,6 @@
  */
 int out_of_memory(void)
 {
-	struct sysinfo swp_info;
-
 	/* Enough free memory?  Not OOM. */
 	if (nr_free_pages() > freepages.min)
 		return 0;
@@ -201,8 +199,7 @@
 		return 0;
 
 	/* Enough swap space left?  Not OOM. */
-	si_swapinfo(&swp_info);
-	if (swp_info.freeswap > 0)
+	if (nr_swap_pages > 0)
 		return 0;
 
 	/* Else... */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)