btrfs-progs: drop unused argument from btrfs_del_ptr
authorDavid Sterba <dsterba@suse.com>
Thu, 2 Feb 2017 12:38:44 +0000 (13:38 +0100)
committerDavid Sterba <dsterba@suse.com>
Wed, 8 Mar 2017 12:00:47 +0000 (13:00 +0100)
Signed-off-by: David Sterba <dsterba@suse.com>
cmds-check.c
ctree.c
ctree.h

index 84e1d99..6586f5a 100644 (file)
@@ -3826,8 +3826,7 @@ static int repair_btree(struct btrfs_root *root,
                                             path.slots[level]);
 
                /* Remove the ptr */
-               ret = btrfs_del_ptr(trans, root, &path, level,
-                                   path.slots[level]);
+               ret = btrfs_del_ptr(root, &path, level, path.slots[level]);
                if (ret < 0)
                        goto out;
                /*
@@ -9145,7 +9144,7 @@ again:
 
 del_ptr:
        printk("deleting pointer to block %Lu\n", corrupt->cache.start);
-       ret = btrfs_del_ptr(trans, info->extent_root, &path, level, slot);
+       ret = btrfs_del_ptr(info->extent_root, &path, level, slot);
 
 out:
        btrfs_release_path(&path);
diff --git a/ctree.c b/ctree.c
index 162e596..551d9dc 100644 (file)
--- a/ctree.c
+++ b/ctree.c
@@ -758,8 +758,7 @@ static int balance_level(struct btrfs_trans_handle *trans,
                        wait_on_tree_block_writeback(root, right);
                        free_extent_buffer(right);
                        right = NULL;
-                       wret = btrfs_del_ptr(trans, root, path,
-                                            level + 1, pslot + 1);
+                       wret = btrfs_del_ptr(root, path, level + 1, pslot + 1);
                        if (wret)
                                ret = wret;
                        wret = btrfs_free_extent(trans, root, bytenr,
@@ -806,7 +805,7 @@ static int balance_level(struct btrfs_trans_handle *trans,
                wait_on_tree_block_writeback(root, mid);
                free_extent_buffer(mid);
                mid = NULL;
-               wret = btrfs_del_ptr(trans, root, path, level + 1, pslot);
+               wret = btrfs_del_ptr(root, path, level + 1, pslot);
                if (wret)
                        ret = wret;
                wret = btrfs_free_extent(trans, root, bytenr, blocksize,
@@ -2599,8 +2598,8 @@ int btrfs_insert_item(struct btrfs_trans_handle *trans, struct btrfs_root
  * continuing all the way the root if required.  The root is converted into
  * a leaf if all the nodes are emptied.
  */
-int btrfs_del_ptr(struct btrfs_trans_handle *trans, struct btrfs_root *root,
-                  struct btrfs_path *path, int level, int slot)
+int btrfs_del_ptr(struct btrfs_root *root, struct btrfs_path *path,
+               int level, int slot)
 {
        struct extent_buffer *parent = path->nodes[level];
        u32 nritems;
@@ -2648,7 +2647,7 @@ static noinline int btrfs_del_leaf(struct btrfs_trans_handle *trans,
        int ret;
 
        WARN_ON(btrfs_header_generation(leaf) != trans->transid);
-       ret = btrfs_del_ptr(trans, root, path, 1, path->slots[1]);
+       ret = btrfs_del_ptr(root, path, 1, path->slots[1]);
        if (ret)
                return ret;
 
diff --git a/ctree.h b/ctree.h
index 08397fa..7063048 100644 (file)
--- a/ctree.h
+++ b/ctree.h
@@ -2565,8 +2565,8 @@ u64 hash_extent_data_ref(u64 root_objectid, u64 owner, u64 offset);
 
 /* ctree.c */
 int btrfs_comp_cpu_keys(struct btrfs_key *k1, struct btrfs_key *k2);
-int btrfs_del_ptr(struct btrfs_trans_handle *trans, struct btrfs_root *root,
-                  struct btrfs_path *path, int level, int slot);
+int btrfs_del_ptr(struct btrfs_root *root, struct btrfs_path *path,
+               int level, int slot);
 enum btrfs_tree_block_status
 btrfs_check_node(struct btrfs_root *root, struct btrfs_disk_key *parent_key,
                 struct extent_buffer *buf);