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>
This commit is contained in:
parent
8a867d1ddd
commit
8a7b9c9b47
|
@ -93,15 +93,14 @@ void cache_tree_init(struct cache_tree *tree)
|
||||||
tree->root = RB_ROOT;
|
tree->root = RB_ROOT;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct cache_extent *
|
static struct cache_extent *alloc_cache_extent(u64 start, u64 size)
|
||||||
alloc_cache_extent(u64 objectid, u64 start, u64 size)
|
|
||||||
{
|
{
|
||||||
struct cache_extent *pe = malloc(sizeof(*pe));
|
struct cache_extent *pe = malloc(sizeof(*pe));
|
||||||
|
|
||||||
if (!pe)
|
if (!pe)
|
||||||
return pe;
|
return pe;
|
||||||
|
|
||||||
pe->objectid = objectid;
|
pe->objectid = 0;
|
||||||
pe->start = start;
|
pe->start = start;
|
||||||
pe->size = size;
|
pe->size = size;
|
||||||
return pe;
|
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)
|
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;
|
int ret;
|
||||||
|
|
||||||
if (!pe) {
|
if (!pe) {
|
||||||
|
|
Loading…
Reference in New Issue