Ext2: return ENOMEM rather than EIO if sb_getblk fails

As the only reason that sb_getblks fails is that allocation fails.
It will be better to use ENOMEM rather than EIO.

Signed-off-by: Wang Shilong <wangsl-fnst@cn.fujitsu.com>
Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
Wang Shilong 2013-01-15 21:19:06 -08:00 committed by Jan Kara
parent 1b7d76e9b1
commit ab6a773dbc
1 changed files with 1 additions and 1 deletions

View File

@ -665,7 +665,7 @@ ext2_xattr_set2(struct inode *inode, struct buffer_head *old_bh,
if (unlikely(!new_bh)) {
ext2_free_blocks(inode, block, 1);
mark_inode_dirty(inode);
error = -EIO;
error = -ENOMEM;
goto cleanup;
}
lock_buffer(new_bh);