summaryrefslogtreecommitdiff
path: root/inode-map.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 /inode-map.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 'inode-map.c')
-rw-r--r--inode-map.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/inode-map.c b/inode-map.c
index f901109d..3e138b53 100644
--- a/inode-map.c
+++ b/inode-map.c
@@ -20,38 +20,6 @@
#include "disk-io.h"
#include "transaction.h"
-int btrfs_find_highest_inode(struct btrfs_root *root, u64 *objectid)
-{
- struct btrfs_path *path;
- int ret;
- struct extent_buffer *l;
- struct btrfs_key search_key;
- struct btrfs_key found_key;
- int slot;
-
- path = btrfs_alloc_path();
- BUG_ON(!path);
-
- search_key.objectid = (u64)-1;
- search_key.offset = (u64)-1;
- ret = btrfs_search_slot(NULL, root, &search_key, path, 0, 0);
- if (ret < 0)
- goto error;
- BUG_ON(ret == 0);
- if (path->slots[0] > 0) {
- slot = path->slots[0] - 1;
- l = path->nodes[0];
- btrfs_item_key_to_cpu(l, &found_key, slot);
- *objectid = found_key.objectid;
- } else {
- *objectid = BTRFS_FIRST_FREE_OBJECTID;
- }
- ret = 0;
-error:
- btrfs_free_path(path);
- return ret;
-}
-
/*
* walks the btree of allocated inodes and find a hole.
*/