Re: 2.4.0-test9: minixfs causing oopsen when out of inodes

From: Daniel Phillips (news-innominate.list.linux.kernel@innominate.de)
Date: Sun Oct 08 2000 - 14:33:23 EDT

  • Next message: Linus Torvalds: "Re: 2.4.0-test9: minixfs causing oopsen when out of inodes"

    Linus Torvalds wrote:
    > This, btw, is why Linux returns error numbers as -Exxx instead of using
    > "-1" and "errno" - I dislike the latter enormously.

    It's not just a matter of disliking it, it's also not reentrant.

    > This is also why the VFS layer tends to use ERR_PTR/PTR_ERR/IS_ERR: it
    > makes it very easy to pass back error information, and it makes it very
    > hard to do it wrong. I suspect both minix and ext2 would be better off
    > using that convention instead.
    >
    > It's not worth changing at this point, but for future reference it would
    > probably be much preferable to return the error code instead of the
    > horrible "error value through pointer access" method, which is usually
    > rather inefficient too.

    It would be nice if we could return a struct consisting of the error and
    result. I'm not sure if this is allowed in C now or not. It didn't
    work when I tried it with gcc: it seems to consider a struct-valued
    function to be a void-valued. Odd.

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



    This archive was generated by hypermail 2b29 : Sun Oct 08 2000 - 14:36:17 EDT