Commit ada9af21 authored by Filipe David Borba Manana's avatar Filipe David Borba Manana Committed by Chris Mason

Btrfs: don't ignore errors from btrfs_run_delayed_items

tree-log.c was ignoring the return value from btrfs_run_delayed_items()
in several places.
Signed-off-by: default avatarFilipe David Borba Manana <fdmanana@gmail.com>
Reviewed-by: default avatarMiao Xie <miaox@cn.fujitsu.com>
Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
Signed-off-by: default avatarChris Mason <chris.mason@fusionio.com>
parent 2bac325e
......@@ -747,7 +747,8 @@ static noinline int drop_one_dir_item(struct btrfs_trans_handle *trans,
ret = btrfs_unlink_inode(trans, root, dir, inode, name, name_len);
if (ret)
goto out;
btrfs_run_delayed_items(trans, root);
else
ret = btrfs_run_delayed_items(trans, root);
out:
kfree(name);
iput(inode);
......@@ -923,7 +924,9 @@ static inline int __add_inode_ref(struct btrfs_trans_handle *trans,
kfree(victim_name);
if (ret)
return ret;
btrfs_run_delayed_items(trans, root);
ret = btrfs_run_delayed_items(trans, root);
if (ret)
return ret;
*search_done = 1;
goto again;
}
......@@ -990,7 +993,9 @@ static inline int __add_inode_ref(struct btrfs_trans_handle *trans,
inode,
victim_name,
victim_name_len);
btrfs_run_delayed_items(trans, root);
if (!ret)
ret = btrfs_run_delayed_items(
trans, root);
}
iput(victim_parent);
kfree(victim_name);
......@@ -1812,7 +1817,7 @@ static noinline int check_item_in_log(struct btrfs_trans_handle *trans,
ret = btrfs_unlink_inode(trans, root, dir, inode,
name, name_len);
if (!ret)
btrfs_run_delayed_items(trans, root);
ret = btrfs_run_delayed_items(trans, root);
kfree(name);
iput(inode);
if (ret)
......
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