--- 2.2.15pre4-raid1/drivers/block/raid1.c.~1~ Tue Dec 22 17:12:38 1998 +++ 2.2.15pre4-raid1/drivers/block/raid1.c Sat Jan 29 14:49:47 2000 @@ -211,7 +211,11 @@ while (!( /* FIXME: now we are rather fault tolerant than nice */ r1_bh = kmalloc (sizeof (struct raid1_bh), GFP_KERNEL) ) ) + { printk ("raid1_make_request(#1): out of memory\n"); + current->policy |= SCHED_YIELD; + schedule(); + } memset (r1_bh, 0, sizeof (struct raid1_bh)); /* @@ -299,7 +303,11 @@ while (!( /* FIXME: now we are rather fault tolerant than nice */ mirror_bh[i] = kmalloc (sizeof (struct buffer_head), GFP_KERNEL) ) ) + { printk ("raid1_make_request(#2): out of memory\n"); + current->policy |= SCHED_YIELD; + schedule(); + } memset (mirror_bh[i], 0, sizeof (struct buffer_head)); /* @@ -711,7 +719,11 @@ while (!( /* FIXME: now we are rather fault tolerant than nice */ mddev->private = kmalloc (sizeof (struct raid1_data), GFP_KERNEL) ) ) + { printk ("raid1_run(): out of memory\n"); + current->policy |= SCHED_YIELD; + schedule(); + } raid_conf = mddev->private; memset(raid_conf, 0, sizeof(*raid_conf));