diff options
author | Jeff Mahoney <jeffm@suse.com> | 2016-06-09 21:38:35 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-07-26 07:53:16 -0400 |
commit | 3cdde2240d4533ff71fbb8dc9c32d5d57d3cdeed (patch) | |
tree | 05a138f31bd51026ecb338cd8720bfbf5f863b25 /fs/btrfs/inode-map.c | |
parent | bc074524e123ded281cde25ebc5661910f9679e3 (diff) |
btrfs: btrfs_test_opt and friends should take a btrfs_fs_info
btrfs_test_opt and friends only use the root pointer to access
the fs_info. Let's pass the fs_info directly in preparation to
eliminate similar patterns all over btrfs.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/inode-map.c')
-rw-r--r-- | fs/btrfs/inode-map.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/btrfs/inode-map.c b/fs/btrfs/inode-map.c index 70107f7c9307..e3ad8c197997 100644 --- a/fs/btrfs/inode-map.c +++ b/fs/btrfs/inode-map.c | |||
@@ -38,7 +38,7 @@ static int caching_kthread(void *data) | |||
38 | int slot; | 38 | int slot; |
39 | int ret; | 39 | int ret; |
40 | 40 | ||
41 | if (!btrfs_test_opt(root, INODE_MAP_CACHE)) | 41 | if (!btrfs_test_opt(root->fs_info, INODE_MAP_CACHE)) |
42 | return 0; | 42 | return 0; |
43 | 43 | ||
44 | path = btrfs_alloc_path(); | 44 | path = btrfs_alloc_path(); |
@@ -141,7 +141,7 @@ static void start_caching(struct btrfs_root *root) | |||
141 | int ret; | 141 | int ret; |
142 | u64 objectid; | 142 | u64 objectid; |
143 | 143 | ||
144 | if (!btrfs_test_opt(root, INODE_MAP_CACHE)) | 144 | if (!btrfs_test_opt(root->fs_info, INODE_MAP_CACHE)) |
145 | return; | 145 | return; |
146 | 146 | ||
147 | spin_lock(&root->ino_cache_lock); | 147 | spin_lock(&root->ino_cache_lock); |
@@ -185,7 +185,7 @@ static void start_caching(struct btrfs_root *root) | |||
185 | 185 | ||
186 | int btrfs_find_free_ino(struct btrfs_root *root, u64 *objectid) | 186 | int btrfs_find_free_ino(struct btrfs_root *root, u64 *objectid) |
187 | { | 187 | { |
188 | if (!btrfs_test_opt(root, INODE_MAP_CACHE)) | 188 | if (!btrfs_test_opt(root->fs_info, INODE_MAP_CACHE)) |
189 | return btrfs_find_free_objectid(root, objectid); | 189 | return btrfs_find_free_objectid(root, objectid); |
190 | 190 | ||
191 | again: | 191 | again: |
@@ -211,7 +211,7 @@ void btrfs_return_ino(struct btrfs_root *root, u64 objectid) | |||
211 | { | 211 | { |
212 | struct btrfs_free_space_ctl *pinned = root->free_ino_pinned; | 212 | struct btrfs_free_space_ctl *pinned = root->free_ino_pinned; |
213 | 213 | ||
214 | if (!btrfs_test_opt(root, INODE_MAP_CACHE)) | 214 | if (!btrfs_test_opt(root->fs_info, INODE_MAP_CACHE)) |
215 | return; | 215 | return; |
216 | again: | 216 | again: |
217 | if (root->ino_cache_state == BTRFS_CACHE_FINISHED) { | 217 | if (root->ino_cache_state == BTRFS_CACHE_FINISHED) { |
@@ -251,7 +251,7 @@ void btrfs_unpin_free_ino(struct btrfs_root *root) | |||
251 | struct rb_node *n; | 251 | struct rb_node *n; |
252 | u64 count; | 252 | u64 count; |
253 | 253 | ||
254 | if (!btrfs_test_opt(root, INODE_MAP_CACHE)) | 254 | if (!btrfs_test_opt(root->fs_info, INODE_MAP_CACHE)) |
255 | return; | 255 | return; |
256 | 256 | ||
257 | while (1) { | 257 | while (1) { |
@@ -412,7 +412,7 @@ int btrfs_save_ino_cache(struct btrfs_root *root, | |||
412 | if (btrfs_root_refs(&root->root_item) == 0) | 412 | if (btrfs_root_refs(&root->root_item) == 0) |
413 | return 0; | 413 | return 0; |
414 | 414 | ||
415 | if (!btrfs_test_opt(root, INODE_MAP_CACHE)) | 415 | if (!btrfs_test_opt(root->fs_info, INODE_MAP_CACHE)) |
416 | return 0; | 416 | return 0; |
417 | 417 | ||
418 | path = btrfs_alloc_path(); | 418 | path = btrfs_alloc_path(); |