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: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Nikolay Borisov 2020-12-07 17:32:33 +02:00 committed by David Sterba
parent 453e487386
commit 543068a217
7 changed files with 12 additions and 12 deletions

View file

@ -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);

View file

@ -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);

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;