summaryrefslogtreecommitdiff
path: root/fs/btrfs/super.c
diff options
context:
space:
mode:
authorMarcos Paulo de Souza <mpdesouza@suse.com>2020-02-21 14:56:12 +0100
committerDavid Sterba <dsterba@suse.com>2020-03-23 17:01:42 +0100
commitc0c907a47dccf2cf26251a8fb4a8e7a3bf79ce84 (patch)
tree6d4ea46fc39badcefcf1cd6a94d0b8b48a4817af /fs/btrfs/super.c
parent748449cdbe434731aac68c8829158741a6f8f249 (diff)
btrfs: export helpers for subvolume name/id resolution
The functions will be used outside of export.c and super.c to allow resolving subvolume name from a given id, eg. for subvolume deletion by id ioctl. Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> [ split from the next patch ] Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r--fs/btrfs/super.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 5c16b4bcde9b..4969fcce0704 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -1024,8 +1024,8 @@ out:
return error;
}
-static char *get_subvol_name_from_objectid(struct btrfs_fs_info *fs_info,
- u64 subvol_objectid)
+char *btrfs_get_subvol_name_from_objectid(struct btrfs_fs_info *fs_info,
+ u64 subvol_objectid)
{
struct btrfs_root *root = fs_info->tree_root;
struct btrfs_root *fs_root = NULL;
@@ -1442,8 +1442,8 @@ static struct dentry *mount_subvol(const char *subvol_name, u64 subvol_objectid,
goto out;
}
}
- subvol_name = get_subvol_name_from_objectid(btrfs_sb(mnt->mnt_sb),
- subvol_objectid);
+ subvol_name = btrfs_get_subvol_name_from_objectid(
+ btrfs_sb(mnt->mnt_sb), subvol_objectid);
if (IS_ERR(subvol_name)) {
root = ERR_CAST(subvol_name);
subvol_name = NULL;