Commit dfe50809 authored by Theodore Ts'o's avatar Theodore Ts'o

ext4: drop EXT4_EX_NOFREE_ON_ERR from rest of extents handling code

Drop EXT4_EX_NOFREE_ON_ERR from ext4_ext_create_new_leaf(),
ext4_split_extent(), ext4_convert_unwritten_extents_endio().

This requires fixing all of their callers to potentially
ext4_ext_find_extent() to free the struct ext4_ext_path object in case
of an error, and there are interlocking dependencies all the way up to
ext4_ext_map_blocks(), ext4_swap_extents(), and
ext4_ext_remove_space().

Once this is done, we can drop the EXT4_EX_NOFREE_ON_ERR flag since it
is no longer necessary.
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent 4f224b8b
......@@ -582,7 +582,6 @@ enum {
*/
#define EXT4_EX_NOCACHE 0x0800
#define EXT4_EX_FORCE_CACHE 0x1000
#define EXT4_EX_NOFREE_ON_ERR 0x2000
/*
* Flags used by ext4_free_blocks
......@@ -2731,7 +2730,7 @@ extern int ext4_can_extents_be_merged(struct inode *inode,
struct ext4_extent *ex1,
struct ext4_extent *ex2);
extern int ext4_ext_insert_extent(handle_t *, struct inode *,
struct ext4_ext_path *,
struct ext4_ext_path **,
struct ext4_extent *, int);
extern struct ext4_ext_path *ext4_ext_find_extent(struct inode *, ext4_lblk_t,
struct ext4_ext_path **,
......
This diff is collapsed.
......@@ -81,7 +81,7 @@ static int finish_range(handle_t *handle, struct inode *inode,
goto err_out;
}
}
retval = ext4_ext_insert_extent(handle, inode, path, &newext, 0);
retval = ext4_ext_insert_extent(handle, inode, &path, &newext, 0);
err_out:
up_write((&EXT4_I(inode)->i_data_sem));
if (path) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment