lkml.org 
[lkml]   [2003]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: any chance of 2.6.0-test*?
    On Sun, 12 Jan 2003, Rob Wilkens wrote:
    > On Sun, 2003-01-12 at 16:15, Matti Aarnio wrote:

    > > At first, read Documentation/CodingStyle of the kernel.
    > > Then have a look into:
    > >
    > > fs/open.c file do_sys_truncate() function.

    > - if (S_ISDIR(inode->i_mode))
    > - goto dput_and_out;
    > + if (S_ISDIR(inode->i_mode)){
    > + path_release(&nd);
    > + return error;
    > + }

    [snip same change in a few more changes]

    OK, now imagine the dcache locking changing a little bit.
    You need to update this piece of (duplicated) code in half
    a dozen places in just this function and no doubt in dozens
    of other places all over fs/*.c.

    From a maintenance point of view, a goto to a single block
    of error handling code is easier to maintain.

    regards,

    Rik
    --
    Bravely reimplemented by the knights who say "NIH".
    http://www.surriel.com/ http://guru.conectiva.com/
    Current spamtrap: <a href=mailto:"october@surriel.com">october@surriel.com</a>
    -
    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: 2005-03-22 13:32    [W:0.023 / U:0.468 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site