Subject: Re: S_IFREG support to mknod(2)
To: None <firstname.lastname@example.org>
From: Antti Kantee <email@example.com>
Date: 02/17/2007 00:01:43
On Fri Feb 16 2007 at 18:25:40 +0000, David Laight wrote:
> > I can't see it. if vn_start_write() fails, it will reset the situation
> > and restart. And you can't end up both in the vn_start_write() failure
> > branch and the error branch without going through start and collecting
> > $vnode.
> > Of course it might be argued that if you're going to fail with EEXIST
> > anyway, you don't need to vn_start_write(), but that's not really a bug.
> > Am I not seeing it?
> yes, look a few lines higher up at the 'default' of the 'switch' statement,
> where error is set to EINVAL.
Ok, could you provide a code path for us blind people (i.e. me)?
If error = EINVAL and we hit the vn_start_write error branch, we have vp
= NULL and dvp != NULL + locked. We then proceed to vput dvp, bringing
us to the same state as before restart. Now, after sleeping but not
changing state, we either return (in case of more errors) or restart.
still blind ;)
Antti Kantee <firstname.lastname@example.org> Of course he runs NetBSD
"la qualité la plus indispensable du cuisinier est l'exactitude"