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
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
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;
>
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()?
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
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
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
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 :).
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));
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
10 matches
Mail list logo