summaryrefslogtreecommitdiff
path: root/volumes.c
diff options
context:
space:
mode:
authorQu Wenruo <quwenruo@cn.fujitsu.com>2017-06-13 17:19:32 +0800
committerDavid Sterba <dsterba@suse.com>2017-07-12 17:53:50 +0200
commit7a36a1216bc72bd0feeb29d9caba14acf648de45 (patch)
tree4d46ad8a1d65a36e58d8c398fbcf8875d6813f28 /volumes.c
parent37ddab31fd0c11b960baf14484567d4f7286874b (diff)
btrfs-progs: Refactor btrfs_chunk_readonly to use btrfs_fs_info
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'volumes.c')
-rw-r--r--volumes.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/volumes.c b/volumes.c
index 5b3b142..bdaca19 100644
--- a/volumes.c
+++ b/volumes.c
@@ -1636,11 +1636,11 @@ btrfs_find_device_by_devid(struct btrfs_fs_devices *fs_devices,
return NULL;
}
-int btrfs_chunk_readonly(struct btrfs_root *root, u64 chunk_offset)
+int btrfs_chunk_readonly(struct btrfs_fs_info *fs_info, u64 chunk_offset)
{
struct cache_extent *ce;
struct map_lookup *map;
- struct btrfs_mapping_tree *map_tree = &root->fs_info->mapping_tree;
+ struct btrfs_mapping_tree *map_tree = &fs_info->mapping_tree;
int readonly = 0;
int i;
@@ -1649,7 +1649,7 @@ int btrfs_chunk_readonly(struct btrfs_root *root, u64 chunk_offset)
* corresponding chunk, we will rebuild it later
*/
ce = search_cache_extent(&map_tree->cache_tree, chunk_offset);
- if (!root->fs_info->is_chunk_recover)
+ if (!fs_info->is_chunk_recover)
BUG_ON(!ce);
else
return 0;