login
Header Space

 
 

Re: [PATCH 2/7] omfs: add inode routines

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <hch@...>
Cc: <linux-kernel@...>, <linux-fsdevel@...>, <akpm@...>, <me@...>
Date: Tuesday, April 15, 2008 - 2:03 pm

Hmm, looks like error handling needs a makeover if this is really to
become example code.  See comments inline.

Somebody said this is fun?  Please do a proper review of this patchset
then, thank you.  ("Political" eh?  Now I think *that* is really
insulting to Andrew)

Miklos




Leaks inode.


This form is preferred:

	ret = -EIO;
	if (!bh)
		goto out_nobh;



Ditto.  If err is the same as assigned previously it doesn't need to
be assigned again, so that even less lines.


Ditto.


Hmm, here it sets ret, but doesn't exit.  Deliberate?


Ditto1.


Ditto2?


Should be:

	if (!bh)
		goto iget_failed;
...

 iget_failed:
	iget_failed(inode);
	return ERR_PTR(-EIO);


Leaks bh.  See above.


Leaks bh.


This is weird.  This should be done by jumping to the proper label
between the brleses.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 2/7] omfs: add inode routines, Bob Copeland, (Sat Apr 12, 6:58 pm)
Re: [PATCH 2/7] omfs: add inode routines, Marcin Slusarz, (Tue Apr 15, 2:30 pm)
Re: [PATCH 2/7] omfs: add inode routines, Bob Copeland, (Tue Apr 15, 7:56 pm)
Re: [PATCH 2/7] omfs: add inode routines, Marcin Slusarz, (Wed Apr 16, 2:31 pm)
Re: [PATCH 2/7] omfs: add inode routines, Miklos Szeredi, (Tue Apr 15, 2:03 pm)
Re: [PATCH 2/7] omfs: add inode routines, Bob Copeland, (Tue Apr 15, 2:33 pm)
Re: [PATCH 2/7] omfs: add inode routines, Alan Cox, (Sun Apr 13, 5:17 am)
Re: [PATCH 2/7] omfs: add inode routines, Christoph Hellwig, (Sun Apr 13, 4:05 am)
speck-geostationary