diff options
author | Wang Shilong | 2013-01-16 06:19:06 +0100 |
---|---|---|
committer | Jan Kara | 2013-01-21 11:19:57 +0100 |
commit | ab6a773dbcbd2bba3ead8676ae21ce5adbbdc035 (patch) | |
tree | 592ec692b6eb5136fe942af8ec30deb7878845f6 /fs/ext2 | |
parent | Ext3: use unlikely to improve the efficiency of the kernel (diff) | |
download | kernel-qcow2-linux-ab6a773dbcbd2bba3ead8676ae21ce5adbbdc035.tar.gz kernel-qcow2-linux-ab6a773dbcbd2bba3ead8676ae21ce5adbbdc035.tar.xz kernel-qcow2-linux-ab6a773dbcbd2bba3ead8676ae21ce5adbbdc035.zip |
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>
Diffstat (limited to 'fs/ext2')
-rw-r--r-- | fs/ext2/xattr.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |