All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Pierre Ossman <drzeus-list@drzeus.cx>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Make prepare_namespace() wait for devices
Date: Thu, 24 May 2007 21:17:37 -0700	[thread overview]
Message-ID: <20070524211737.daa3c99c.akpm@linux-foundation.org> (raw)
In-Reply-To: <4656602A.3010000@drzeus.cx>

On Fri, 25 May 2007 06:03:54 +0200 Pierre Ossman <drzeus-list@drzeus.cx> wrote:

> Andrew Morton wrote:
> > On Thu, 24 May 2007 14:21:35 +0200
> > Pierre Ossman <drzeus-list@drzeus.cx> 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);
> >
> > ?
> >   
> 
> How would ROOT_DEV get updated in that loop?
> 

Whatever.  I think you can work it out ;)   

while (driver_probe_done() || (ROOT_DEV = name_to_dev_t(...)) == 0)

perhaps?

The loop-which-sleeps within a loop-which-sleeps seems poorly thought out?

  reply	other threads:[~2007-05-25  4:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-24 12:21 [PATCH] Make prepare_namespace() wait for devices Pierre Ossman
2007-05-24 18:35 ` Olaf Hering
2007-05-24 20:46   ` Pierre Ossman
2007-05-25  0:06 ` Andrew Morton
2007-05-25  4:03   ` Pierre Ossman
2007-05-25  4:17     ` Andrew Morton [this message]
2007-05-25  4:31       ` Pierre Ossman
2007-05-31 11:20         ` Pierre Ossman
2007-05-31 15:51           ` Andrew Morton
2007-06-01  5:24             ` Pierre Ossman
2007-06-01  6:40               ` Andrew Morton
2007-06-01  6:51                 ` Pierre Ossman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070524211737.daa3c99c.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=drzeus-list@drzeus.cx \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.