Re: [PATCH 07/30] IGET: Stop BEFS from using iget() and read_inode()

2007-10-02 Thread Dave Kleikamp
On Tue, 2007-10-02 at 14:24 +0100, David Howells wrote: > Dave Kleikamp <[EMAIL PROTECTED]> wrote: > > > Of course, the cast is unnecessary, > > The cast is necessary as the argument is a const pointer and the return type > is not. Ah yes. I stand corrected. -- David Kleikamp IBM Linux Techno

Re: [PATCH 07/30] IGET: Stop BEFS from using iget() and read_inode()

2007-10-02 Thread David Howells
Dave Kleikamp <[EMAIL PROTECTED]> wrote: > Of course, the cast is unnecessary, The cast is necessary as the argument is a const pointer and the return type is not. > and I'm sure you meant to return error: Oops. Yes, I changed my mind and renamed the argument to be 'error', but forgot to chang

Re: [PATCH 07/30] IGET: Stop BEFS from using iget() and read_inode()

2007-10-02 Thread Dave Kleikamp
On Tue, 2007-10-02 at 13:32 +0100, David Howells wrote: > Zach Brown <[EMAIL PROTECTED]> wrote: > > > /* haha, continuing the fine tradition of terrible names in this api.. */ > > static inline void *PTR_PTR(void *err_ptr) { > > BUG_ON(!IS_ERR(err_ptr) || !err_ptr); > > return err_ptr; >

Re: [PATCH 07/30] IGET: Stop BEFS from using iget() and read_inode()

2007-10-02 Thread David Howells
Zach Brown <[EMAIL PROTECTED]> wrote: > /* haha, continuing the fine tradition of terrible names in this api.. */ > static inline void *PTR_PTR(void *err_ptr) { > BUG_ON(!IS_ERR(err_ptr) || !err_ptr); > return err_ptr; > } How about ERR_CAST() instead? Or maybe CAST_ERR()?

Re: [PATCH 07/30] IGET: Stop BEFS from using iget() and read_inode()

2007-10-01 Thread Zach Brown
return ERR_PTR(PTR_ERR(inode)); I tend to prefer the latter. It seems like a pretty noisy way to get a (void *) cast :/. Maybe a function that has the cast but makes sure it's only used for IS_ERR() pointers? /* haha, continuing the fine tradition of terrible names in this ap

Re: [PATCH 07/30] IGET: Stop BEFS from using iget() and read_inode()

2007-10-01 Thread Linus Torvalds
On Mon, 1 Oct 2007, Christoph Hellwig wrote: > > befs_lookup, which the above gem is from, returns a dentry *. Ahh, ok. Then it actually makes sense. Although I'd prefer it if people planned on writing code like that more along the lines of error = PTR_ERR(inode); if (IS_ERR(i

Re: [PATCH 07/30] IGET: Stop BEFS from using iget() and read_inode()

2007-10-01 Thread Christoph Hellwig
On Mon, Oct 01, 2007 at 10:44:59AM -0700, Linus Torvalds wrote: > > If you're soliciting opinions, I think I tend to prefer the feel of the > > code paths after the changes. I don't know the benefits of the change > > are worth the risk in unmaintained file systems, though. > > > > > + re

Re: [PATCH 07/30] IGET: Stop BEFS from using iget() and read_inode()

2007-10-01 Thread Zach Brown
If you're soliciting opinions, I think I tend to prefer the feel of the code paths after the changes. I don't know the benefits of the change are worth the risk in unmaintained file systems, though. > + return ERR_PTR(PTR_ERR(inode)); This caught my eye. Surely we can do better :).

Re: [PATCH 07/30] IGET: Stop BEFS from using iget() and read_inode()

2007-10-01 Thread Linus Torvalds
On Mon, 1 Oct 2007, Zach Brown wrote: > > If you're soliciting opinions, I think I tend to prefer the feel of the > code paths after the changes. I don't know the benefits of the change > are worth the risk in unmaintained file systems, though. > > > + return ERR_PTR(PTR_ERR(inode));

[PATCH 07/30] IGET: Stop BEFS from using iget() and read_inode()

2007-10-01 Thread David Howells
Stop the BEFS filesystem from using iget() and read_inode(). Replace befs_read_inode() with befs_iget(), and call that instead of iget(). befs_iget() then uses iget_locked() directly and returns a proper error code instead of an inode in the event of an error. befs_fill_super() returns any error