Skip to content

Commit ab6a773

Browse files
Wang Shilongjankara
authored andcommitted
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>
1 parent 1b7d76e commit ab6a773

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎fs/ext2/xattr.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ ext2_xattr_set2(struct inode *inode, struct buffer_head *old_bh,
665665
if (unlikely(!new_bh)) {
666666
ext2_free_blocks(inode, block, 1);
667667
mark_inode_dirty(inode);
668-
error = -EIO;
668+
error = -ENOMEM;
669669
goto cleanup;
670670
}
671671
lock_buffer(new_bh);

0 commit comments

Comments
 (0)