summaryrefslogtreecommitdiff
path: root/extent-cache.c
diff options
context:
space:
mode:
authorNikolay Borisov <nborisov@suse.com>2018-05-04 10:47:27 +0300
committerDavid Sterba <dsterba@suse.com>2018-06-07 16:37:32 +0200
commit8a7b9c9b47f9ff0d56ee016f3d2794112e9e822c (patch)
tree229e09fae4625d88978b145f62ff7f32a7789311 /extent-cache.c
parent8a867d1dddd48f71a6f2e7c035be823b654f8baa (diff)
btrfs-progs: Remove objectid argument from alloc_cache_extent
This function is always called with objectid set to 0. So remove the parameter and statically set the ->objectid to 0 when allocating a new extent. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'extent-cache.c')
-rw-r--r--extent-cache.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/extent-cache.c b/extent-cache.c
index 662c801e..f458de26 100644
--- a/extent-cache.c
+++ b/extent-cache.c
@@ -93,15 +93,14 @@ void cache_tree_init(struct cache_tree *tree)
tree->root = RB_ROOT;
}
-static struct cache_extent *
-alloc_cache_extent(u64 objectid, u64 start, u64 size)
+static struct cache_extent *alloc_cache_extent(u64 start, u64 size)
{
struct cache_extent *pe = malloc(sizeof(*pe));
if (!pe)
return pe;
- pe->objectid = objectid;
+ pe->objectid = 0;
pe->start = start;
pe->size = size;
return pe;
@@ -109,7 +108,7 @@ alloc_cache_extent(u64 objectid, u64 start, u64 size)
int add_cache_extent(struct cache_tree *tree, u64 start, u64 size)
{
- struct cache_extent *pe = alloc_cache_extent(0, start, size);
+ struct cache_extent *pe = alloc_cache_extent(start, size);
int ret;
if (!pe) {