Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Wang Shilong and committed by
Jan Kara
ab6a773d 1b7d76e9

+1 -1
+1 -1
fs/ext2/xattr.c
··· 665 665 if (unlikely(!new_bh)) { 666 666 ext2_free_blocks(inode, block, 1); 667 667 mark_inode_dirty(inode); 668 - error = -EIO; 668 + error = -ENOMEM; 669 669 goto cleanup; 670 670 } 671 671 lock_buffer(new_bh);