mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
synced 2024-12-12 21:53:43 +08:00
btrfs-progs: btrfstune: Remove fs_info arg from change_device_uuid
This function already takes an extent buffer that contains a reference to the fs_info. Use that and reduce argument count. No functional changes. Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
9f6d9ec10c
commit
9b521de429
@ -179,10 +179,10 @@ out:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int change_device_uuid(struct btrfs_fs_info *fs_info, struct extent_buffer *eb,
|
static int change_device_uuid(struct extent_buffer *eb, int slot)
|
||||||
int slot)
|
|
||||||
{
|
{
|
||||||
struct btrfs_dev_item *di;
|
struct btrfs_dev_item *di;
|
||||||
|
struct btrfs_fs_info *fs_info = eb->fs_info;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
di = btrfs_item_ptr(eb, slot, struct btrfs_dev_item);
|
di = btrfs_item_ptr(eb, slot, struct btrfs_dev_item);
|
||||||
@ -217,7 +217,7 @@ static int change_devices_uuid(struct btrfs_fs_info *fs_info)
|
|||||||
if (key.type != BTRFS_DEV_ITEM_KEY ||
|
if (key.type != BTRFS_DEV_ITEM_KEY ||
|
||||||
key.objectid != BTRFS_DEV_ITEMS_OBJECTID)
|
key.objectid != BTRFS_DEV_ITEMS_OBJECTID)
|
||||||
goto next;
|
goto next;
|
||||||
ret = change_device_uuid(fs_info, path.nodes[0], path.slots[0]);
|
ret = change_device_uuid(path.nodes[0], path.slots[0]);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto out;
|
goto out;
|
||||||
next:
|
next:
|
||||||
|
Loading…
Reference in New Issue
Block a user