summaryrefslogtreecommitdiff
path: root/root-tree.c
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2013-08-06 20:03:33 -0500
committerDavid Sterba <dsterba@suse.cz>2013-09-03 19:40:53 +0200
commit989ca65a11c4c537127207eaa019ac4149599017 (patch)
treeb798a8113b8dbf4f5541653046cd8fa53540cde1 /root-tree.c
parent6a0af4e57b58e9756e246db6967423ea6fa83265 (diff)
btrfs-progs: mark static & remove unused from shared kernel code
In files copied from the kernel, mark many functions as static, and remove any resulting dead code. Some functions are left unmarked if they aren't static in the kernel tree. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'root-tree.c')
-rw-r--r--root-tree.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/root-tree.c b/root-tree.c
index ea8c6bbb..bdc85044 100644
--- a/root-tree.c
+++ b/root-tree.c
@@ -138,33 +138,6 @@ int btrfs_insert_root(struct btrfs_trans_handle *trans, struct btrfs_root
return ret;
}
-int btrfs_del_root(struct btrfs_trans_handle *trans, struct btrfs_root *root,
- struct btrfs_key *key)
-{
- struct btrfs_path *path;
- int ret;
- u32 refs;
- struct btrfs_root_item *ri;
- struct extent_buffer *leaf;
-
- path = btrfs_alloc_path();
- BUG_ON(!path);
- ret = btrfs_search_slot(trans, root, key, path, -1, 1);
- if (ret < 0)
- goto out;
- BUG_ON(ret != 0);
- leaf = path->nodes[0];
- ri = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_root_item);
-
- refs = btrfs_disk_root_refs(leaf, ri);
- BUG_ON(refs != 0);
- ret = btrfs_del_item(trans, root, path);
-out:
- btrfs_release_path(path);
- btrfs_free_path(path);
- return ret;
-}
-
/*
* add a btrfs_root_ref item. type is either BTRFS_ROOT_REF_KEY
* or BTRFS_ROOT_BACKREF_KEY.