[PATCH] swapon note error

From: Hugh Dickins
Date: Fri Aug 29 2003 - 16:03:15 EST


It's good that swapon fails on a tmpfs file ("swapfile has holes"),
but not good that it then hangs up: note error from setup_swap_extents.

Hugh

--- 2.6.0-test4-mm3-1/mm/swapfile.c Mon Aug 11 14:20:43 2003
+++ linux/mm/swapfile.c Fri Aug 29 20:53:33 2003
@@ -1403,7 +1403,8 @@
p->max = maxpages;
p->pages = nr_good_pages;

- if (setup_swap_extents(p))
+ error = setup_swap_extents(p);
+ if (error)
goto bad_swap;

swap_list_lock();

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