Browse Source

ext4: make ext4_split_extent() handle error correctly

Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: Mingming Cao <cmm@us.ibm.com>
Yongqiang Yang 14 years ago
parent
commit
93917411be
1 changed files with 2 additions and 0 deletions
  1. 2 0
      fs/ext4/extents.c

+ 2 - 0
fs/ext4/extents.c

@@ -2716,6 +2716,8 @@ static int ext4_split_extent(handle_t *handle,
 				       EXT4_EXT_MARK_UNINIT2;
 				       EXT4_EXT_MARK_UNINIT2;
 		err = ext4_split_extent_at(handle, inode, path,
 		err = ext4_split_extent_at(handle, inode, path,
 				map->m_lblk + map->m_len, split_flag1, flags1);
 				map->m_lblk + map->m_len, split_flag1, flags1);
+		if (err)
+			goto out;
 	}
 	}
 
 
 	ext4_ext_drop_refs(path);
 	ext4_ext_drop_refs(path);