Re: [PATCH] Make prepare_namespace() wait for devices

From: Andrew Morton
Date: Thu May 24 2007 - 20:07:15 EST


On Thu, 24 May 2007 14:21:35 +0200
Pierre Ossman <drzeus-list@xxxxxxxxx> wrote:

> + /* wait for any asynchronous scanning to complete */
> + if ((ROOT_DEV == 0) && root_wait) {
> + printk(KERN_INFO "Waiting for root device %s...\n",
> + saved_root_name);
> + do {
> + while (driver_probe_done() != 0)
> + msleep(100);
> + ROOT_DEV = name_to_dev_t(saved_root_name);
> + if (ROOT_DEV == 0)
> + msleep(100);
> + } while (ROOT_DEV == 0);
> + }

This seems overly complex. Can't we simply do


while (driver_probe_done() || ROOT_DEV == 0)
msleep(100);

?
-
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/