From: Wang Shilong Date: Wed, 16 Jan 2013 05:19:06 +0000 (-0800) Subject: Ext2: return ENOMEM rather than EIO if sb_getblk fails X-Git-Tag: Ubuntu-snapdragon-4.4.0-1029.32~11459^2~9 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=ab6a773dbcbd2bba3ead8676ae21ce5adbbdc035;p=mirror_ubuntu-zesty-kernel.git 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 Signed-off-by: Jan Kara --- diff --git a/fs/ext2/xattr.c b/fs/ext2/xattr.c index 06209ec46152..2d7557db3ae8 100644 --- a/fs/ext2/xattr.c +++ b/fs/ext2/xattr.c @@ -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);