'trans' and 'root' argument not used in fixup_low_keys() are deleted.
And, the argument that became unnecessary is deleted about the caller
of fixup_low_keys().
Signed-off-by: Tsutomu Itoh
---
fs/btrfs/ctree.c | 49 ---
fs/btrfs/ctree.h |6 +---
fs/btrfs/dir-item.c|2 +-
fs/btrfs/extent-tree.c |9 +++
fs/btrfs/file-item.c | 11 -
fs/btrfs/file.c|6 ++--
fs/btrfs/inode-item.c |3 +-
fs/btrfs/inode.c |2 +-
fs/btrfs/tree-log.c|2 +-
9 files changed, 39 insertions(+), 51 deletions(-)
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index 84d7ca1..d080042 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -36,10 +36,10 @@ static int balance_node_right(struct btrfs_trans_handle
*trans,
struct btrfs_root *root,
struct extent_buffer *dst_buf,
struct extent_buffer *src_buf);
-static int del_ptr(struct btrfs_trans_handle *trans, struct btrfs_root *root,
+static int del_ptr(struct btrfs_root *root,
struct btrfs_path *path, int level, int slot);
-static int setup_items_for_insert(struct btrfs_trans_handle *trans,
- struct btrfs_root *root, struct btrfs_path *path,
+static int setup_items_for_insert(struct btrfs_root *root,
+ struct btrfs_path *path,
struct btrfs_key *cpu_key, u32 *data_size,
u32 total_data, u32 total_size, int nr);
@@ -994,8 +994,7 @@ static noinline int balance_level(struct btrfs_trans_handle
*trans,
if (btrfs_header_nritems(right) == 0) {
clean_tree_block(trans, root, right);
btrfs_tree_unlock(right);
- wret = del_ptr(trans, root, path, level + 1, pslot +
- 1);
+ wret = del_ptr(root, path, level + 1, pslot + 1);
if (wret)
ret = wret;
root_sub_used(root, right->len);
@@ -1035,7 +1034,7 @@ static noinline int balance_level(struct
btrfs_trans_handle *trans,
if (btrfs_header_nritems(mid) == 0) {
clean_tree_block(trans, root, mid);
btrfs_tree_unlock(mid);
- wret = del_ptr(trans, root, path, level + 1, pslot);
+ wret = del_ptr(root, path, level + 1, pslot);
if (wret)
ret = wret;
root_sub_used(root, mid->len);
@@ -1767,8 +1766,7 @@ done:
* If this fails to write a tree block, it returns -1, but continues
* fixing up the blocks in ram so the tree is consistent.
*/
-static int fixup_low_keys(struct btrfs_trans_handle *trans,
- struct btrfs_root *root, struct btrfs_path *path,
+static int fixup_low_keys(struct btrfs_path *path,
struct btrfs_disk_key *key, int level)
{
int i;
@@ -1794,8 +1792,7 @@ static int fixup_low_keys(struct btrfs_trans_handle
*trans,
* This function isn't completely safe. It's the caller's responsibility
* that the new key won't break the order
*/
-int btrfs_set_item_key_safe(struct btrfs_trans_handle *trans,
- struct btrfs_root *root, struct btrfs_path *path,
+int btrfs_set_item_key_safe(struct btrfs_path *path,
struct btrfs_key *new_key)
{
struct btrfs_disk_key disk_key;
@@ -1819,7 +1816,7 @@ int btrfs_set_item_key_safe(struct btrfs_trans_handle
*trans,
btrfs_set_item_key(eb, &disk_key, slot);
btrfs_mark_buffer_dirty(eb);
if (slot == 0)
- fixup_low_keys(trans, root, path, &disk_key, 1);
+ fixup_low_keys(path, &disk_key, 1);
return 0;
}
@@ -2584,7 +2581,7 @@ static noinline int __push_leaf_left(struct
btrfs_trans_handle *trans,
clean_tree_block(trans, root, right);
btrfs_item_key(right, &disk_key, 0);
- wret = fixup_low_keys(trans, root, path, &disk_key, 1);
+ wret = fixup_low_keys(path, &disk_key, 1);
if (wret)
ret = wret;
@@ -2971,8 +2968,7 @@ again:
path->nodes[0] = right;
path->slots[0] = 0;
if (path->slots[1] == 0) {
- wret = fixup_low_keys(trans, root,
- path, &disk_key, 1);
+ wret = fixup_low_keys(path, &disk_key, 1);
if (wret)
ret = wret;
}
@@ -3192,7 +3188,7 @@ int btrfs_duplicate_item(struct btrfs_trans_handle *trans,
return ret;
path->slots[0]++;
- ret = setup_items_for_insert(trans, root, path, new_key, &item_size,
+ ret = setup_item