ARM: mach-shmobile: mackerel: enable REGULATOR in defconfig
[firefly-linux-kernel-4.4.55.git] / fs / ext2 / xattr.c
index b6754dbbce3c5e4942d8f46273d24c1236f0588b..2d7557db3ae855b614b0c70d2803adafb0f64181 100644 (file)
@@ -662,10 +662,10 @@ ext2_xattr_set2(struct inode *inode, struct buffer_head *old_bh,
                        ea_idebug(inode, "creating block %d", block);
 
                        new_bh = sb_getblk(sb, block);
-                       if (!new_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);