[patch] mempool-2.5.1-D0

Ingo Molnar (mingo@elte.hu)
Fri, 14 Dec 2001 14:49:54 +0100 (CET)


the attached patch against -pre11 fixes a possible deadlock pointed out by
Arjan: gfp_nowait needs to exclude __GFP_IO as well, to avoid some of the
deeper deadlocks where the first ->alloc() would generate IO.

Ingo

--- linux/mm/mempool.c.orig Fri Dec 14 12:34:08 2001
+++ linux/mm/mempool.c Fri Dec 14 12:35:53 2001
@@ -185,7 +185,7 @@
struct list_head *tmp;
int curr_nr;
DECLARE_WAITQUEUE(wait, current);
- int gfp_nowait = gfp_mask & ~__GFP_WAIT;
+ int gfp_nowait = gfp_mask & ~(__GFP_WAIT | __GFP_IO);

repeat_alloc:
element = pool->alloc(gfp_nowait, pool->pool_data);

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