lkml.org 
[lkml]   [2007]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 07/30] IGET: Stop BEFS from using iget() and read_inode()
    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.
    > >
    > > > + return ERR_PTR(PTR_ERR(inode));
    > >
    > > This caught my eye. Surely we can do better :). It seems to happen a
    > > few times in the patches, the instance in this patch was the first that
    > > I noticed.
    >
    > Yeah. The above obviously *should* be the same as
    >
    > return inode;
    >
    > apart from a few casts. But if the casts matter, there's something else
    > wrong.

    befs_lookup, which the above gem is from, returns a dentry *.

    And given either

    return (dentry *)inode;

    or
    return ERR_PTR(PTR_ERR(inode));

    I tend to prefer the latter.
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-10-01 20:09    [W:5.046 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site