summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQu Wenruo <quwenruo@cn.fujitsu.com>2017-06-13 17:19:23 +0800
committerDavid Sterba <dsterba@suse.com>2017-07-12 17:52:59 +0200
commitde8622fcd0f5bbd5326a12329edab542213dba82 (patch)
tree4dbc660c71e1f0c3e99e6b9dcb1047965876c14c
parentf85fc6e378291c7816be6be3ab71beb2e954827c (diff)
btrfs-progs: btrfstune: Refactor change_devices_uuid to use btrfs_fs_info
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r--btrfstune.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/btrfstune.c b/btrfstune.c
index 580fb401..2d85b041 100644
--- a/btrfstune.c
+++ b/btrfstune.c
@@ -177,10 +177,9 @@ out:
return ret;
}
-static int change_device_uuid(struct btrfs_root *root, struct extent_buffer *eb,
+static int change_device_uuid(struct btrfs_fs_info *fs_info, struct extent_buffer *eb,
int slot)
{
- struct btrfs_fs_info *fs_info = root->fs_info;
struct btrfs_dev_item *di;
int ret = 0;
@@ -216,7 +215,7 @@ static int change_devices_uuid(struct btrfs_fs_info *fs_info)
if (key.type != BTRFS_DEV_ITEM_KEY ||
key.objectid != BTRFS_DEV_ITEMS_OBJECTID)
goto next;
- ret = change_device_uuid(root, path.nodes[0], path.slots[0]);
+ ret = change_device_uuid(fs_info, path.nodes[0], path.slots[0]);
if (ret < 0)
goto out;
next: