Commit 543068a2 authored by Nikolay Borisov's avatar Nikolay Borisov Committed by David Sterba

btrfs: rename btrfs_find_free_objectid to btrfs_get_free_objectid

This better reflects the semantics of the function i.e no search is
performed whatsoever.
Reviewed-by: default avatarJosef Bacik <josef@toxicpanda.com>
Signed-off-by: default avatarNikolay Borisov <nborisov@suse.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 453e4873
......@@ -4778,7 +4778,7 @@ int btrfs_init_root_free_objectid(struct btrfs_root *root)
return ret;
}
int btrfs_find_free_objectid(struct btrfs_root *root, u64 *objectid)
int btrfs_get_free_objectid(struct btrfs_root *root, u64 *objectid)
{
int ret;
mutex_lock(&root->objectid_mutex);
......
......@@ -133,7 +133,7 @@ struct btrfs_root *btrfs_create_tree(struct btrfs_trans_handle *trans,
int btree_lock_page_hook(struct page *page, void *data,
void (*flush_fn)(void *));
int btrfs_get_num_tolerated_disk_barrier_failures(u64 flags);
int btrfs_find_free_objectid(struct btrfs_root *root, u64 *objectid);
int btrfs_get_free_objectid(struct btrfs_root *root, u64 *objectid);
int btrfs_init_root_free_objectid(struct btrfs_root *root);
int __init btrfs_end_io_wq_init(void);
void __cold btrfs_end_io_wq_exit(void);
......
......@@ -198,7 +198,7 @@ int create_free_space_inode(struct btrfs_trans_handle *trans,
int ret;
u64 ino;
ret = btrfs_find_free_objectid(trans->fs_info->tree_root, &ino);
ret = btrfs_get_free_objectid(trans->fs_info->tree_root, &ino);
if (ret < 0)
return ret;
......
......@@ -6371,7 +6371,7 @@ static int btrfs_mknod(struct inode *dir, struct dentry *dentry,
if (IS_ERR(trans))
return PTR_ERR(trans);
err = btrfs_find_free_objectid(root, &objectid);
err = btrfs_get_free_objectid(root, &objectid);
if (err)
goto out_unlock;
......@@ -6435,7 +6435,7 @@ static int btrfs_create(struct inode *dir, struct dentry *dentry,
if (IS_ERR(trans))
return PTR_ERR(trans);
err = btrfs_find_free_objectid(root, &objectid);
err = btrfs_get_free_objectid(root, &objectid);
if (err)
goto out_unlock;
......@@ -6579,7 +6579,7 @@ static int btrfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
if (IS_ERR(trans))
return PTR_ERR(trans);
err = btrfs_find_free_objectid(root, &objectid);
err = btrfs_get_free_objectid(root, &objectid);
if (err)
goto out_fail;
......@@ -9079,7 +9079,7 @@ static int btrfs_whiteout_for_rename(struct btrfs_trans_handle *trans,
u64 objectid;
u64 index;
ret = btrfs_find_free_objectid(root, &objectid);
ret = btrfs_get_free_objectid(root, &objectid);
if (ret)
return ret;
......@@ -9575,7 +9575,7 @@ static int btrfs_symlink(struct inode *dir, struct dentry *dentry,
if (IS_ERR(trans))
return PTR_ERR(trans);
err = btrfs_find_free_objectid(root, &objectid);
err = btrfs_get_free_objectid(root, &objectid);
if (err)
goto out_unlock;
......@@ -9909,7 +9909,7 @@ static int btrfs_tmpfile(struct inode *dir, struct dentry *dentry, umode_t mode)
if (IS_ERR(trans))
return PTR_ERR(trans);
ret = btrfs_find_free_objectid(root, &objectid);
ret = btrfs_get_free_objectid(root, &objectid);
if (ret)
goto out;
......
......@@ -613,7 +613,7 @@ static noinline int create_subvol(struct inode *dir,
if (!root_item)
return -ENOMEM;
ret = btrfs_find_free_objectid(fs_info->tree_root, &objectid);
ret = btrfs_get_free_objectid(fs_info->tree_root, &objectid);
if (ret)
goto fail_free;
......
......@@ -3434,7 +3434,7 @@ struct inode *create_reloc_inode(struct btrfs_fs_info *fs_info,
return ERR_CAST(trans);
}
err = btrfs_find_free_objectid(root, &objectid);
err = btrfs_get_free_objectid(root, &objectid);
if (err)
goto out;
......
......@@ -1526,7 +1526,7 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans,
ASSERT(pending->root_item);
new_root_item = pending->root_item;
pending->error = btrfs_find_free_objectid(tree_root, &objectid);
pending->error = btrfs_get_free_objectid(tree_root, &objectid);
if (pending->error)
goto no_free_objectid;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment