Skip to content

Commit

Permalink
Ext2: return ENOMEM rather than EIO if sb_getblk fails
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
  • Loading branch information
Wang Shilong authored and jankara committed Jan 21, 2013
1 parent 1b7d76e commit ab6a773
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ext2/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ab6a773

Please sign in to comment.