Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ab6a773d authored by Wang Shilong's avatar Wang Shilong Committed by Jan Kara
Browse files

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: default avatarWang Shilong <wangsl-fnst@cn.fujitsu.com>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent 1b7d76e9
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -665,7 +665,7 @@ ext2_xattr_set2(struct inode *inode, struct buffer_head *old_bh,
			if (unlikely(!new_bh)) {
			if (unlikely(!new_bh)) {
				ext2_free_blocks(inode, block, 1);
				ext2_free_blocks(inode, block, 1);
				mark_inode_dirty(inode);
				mark_inode_dirty(inode);
				error = -EIO;
				error = -ENOMEM;
				goto cleanup;
				goto cleanup;
			}
			}
			lock_buffer(new_bh);
			lock_buffer(new_bh);