[PATCH] ext2 allocation failures

From: Hugh Dickins (hugh@veritas.com)
Date: Tue Jan 21 2003 - 15:54:37 EST

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 :-]


--- 2.5.59/fs/ext2/balloc.c Tue Dec 24 06:23:03 2002
+++ linux/fs/ext2/balloc.c Tue Jan 21 20:14:37 2003
@@ -470,10 +470,10 @@
         ext2_debug ("allocating block %d. ", block);
+ *err = 0;
         group_release_blocks(desc, gdp_bh, group_alloc);
         release_blocks(sb, es_alloc);
- *err = 0;
         unlock_super (sb);
         DQUOT_FREE_BLOCK(inode, dq_alloc);

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/

This archive was generated by hypermail 2b29 : Thu Jan 23 2003 - 22:00:27 EST