ext4: make ext4_split_extent() handle error correctly
authorYongqiang Yang <xiaoqiangnk@gmail.com>
Mon, 23 May 2011 00:49:12 +0000 (20:49 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 23 May 2011 00:49:12 +0000 (20:49 -0400)
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>
fs/ext4/extents.c

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