From: Hugh Dickins ext2_new_blocks has a nice io_error label for setting -EIO, so goto that in the one place that doesn't already use it. Signed-off-by: Hugh Dickins Cc: Martin Bligh Acked-by: Mingming Cao Signed-off-by: Andrew Morton --- fs/ext2/balloc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff -puN fs/ext2/balloc.c~ext2-balloc-use-io_error-label fs/ext2/balloc.c --- a/fs/ext2/balloc.c~ext2-balloc-use-io_error-label +++ a/fs/ext2/balloc.c @@ -1297,10 +1297,9 @@ retry_alloc: if (group_no >= ngroups) group_no = 0; gdp = ext2_get_group_desc(sb, group_no, &gdp_bh); - if (!gdp) { - *errp = -EIO; - goto out; - } + if (!gdp) + goto io_error; + free_blocks = le16_to_cpu(gdp->bg_free_blocks_count); /* * skip this group if the number of _