[lkml]   [2003]   [Jan]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] ext2 allocation failures
Hugh Dickins wrote:
> For almost a year (since 2.5.4) ext2_new_block has tended to set err
> 0 instead of -ENOSPC or -EIO. This manifested variously (typically
> depends on what's stale in ext2_get_block's chain[4] array): sometimes
> __brelse free free buffer backtraces, sometimes release_pages oops,
> usually generic_make_request beyond end of device messages, followed
> by further ext2 errors.


> [Insert lecture on dangers of using goto for unwind :-]

Actually, I rather don't like the practice of:

*errp = -EFOO;
<200 lines of code>
if (something_bad)
goto out;

And lo, both ext2_new_block() and ext3_new_block() have additional
bugs, due mainly to this dubious optimisation.

I'll change them to the very straightforward

if (something_bad) {
*errp = -EFOO;
goto out;

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:32    [W:0.032 / U:0.744 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site