Subject: Re: S_IFREG support to mknod(2)
To: Antti Kantee <pooka@cs.hut.fi>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 02/16/2007 18:25:40
On Fri, Feb 16, 2007 at 07:23:29PM +0200, Antti Kantee wrote:
> On Fri Feb 16 2007 at 16:51:45 +0000, David Laight wrote:
> > Not really, but you've made me look at sys_mknod()!
> > 
> > AFAICT the recent changes for vn_start_write() have broken the error paths.
> 
> 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.

I actually looked to see it it were possible to only have one switch
statement.

	David

-- 
David Laight: david@l8s.co.uk