瀏覽代碼

ext4: add missing error checking to ext4_expand_extra_isize_ea()

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Roel Kluin 16 年之前
父節點
當前提交
9aaab0589b
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      fs/ext4/xattr.c

+ 2 - 0
fs/ext4/xattr.c

@@ -1300,6 +1300,8 @@ int ext4_expand_extra_isize_ea(struct inode *inode, int new_extra_isize,
 
 		/* Remove the chosen entry from the inode */
 		error = ext4_xattr_ibody_set(handle, inode, &i, is);
+		if (error)
+			goto cleanup;
 
 		entry = IFIRST(header);
 		if (entry_size + EXT4_XATTR_SIZE(size) >= new_extra_isize)