Commit 6701bdb3 authored by David Sterba's avatar David Sterba

btrfs: get fs_info from block group in write_pinned_extent_entries

We can read fs_info from the block group cache structure and can drop it
from the parameters.
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent bb6cb1c5
...@@ -1039,8 +1039,7 @@ update_cache_item(struct btrfs_trans_handle *trans, ...@@ -1039,8 +1039,7 @@ update_cache_item(struct btrfs_trans_handle *trans,
return -1; return -1;
} }
static noinline_for_stack int static noinline_for_stack int write_pinned_extent_entries(
write_pinned_extent_entries(struct btrfs_fs_info *fs_info,
struct btrfs_block_group_cache *block_group, struct btrfs_block_group_cache *block_group,
struct btrfs_io_ctl *io_ctl, struct btrfs_io_ctl *io_ctl,
int *entries) int *entries)
...@@ -1059,7 +1058,7 @@ write_pinned_extent_entries(struct btrfs_fs_info *fs_info, ...@@ -1059,7 +1058,7 @@ write_pinned_extent_entries(struct btrfs_fs_info *fs_info,
* We shouldn't have switched the pinned extents yet so this is the * We shouldn't have switched the pinned extents yet so this is the
* right one * right one
*/ */
unpin = fs_info->pinned_extents; unpin = block_group->fs_info->pinned_extents;
start = block_group->key.objectid; start = block_group->key.objectid;
...@@ -1235,7 +1234,6 @@ static int __btrfs_write_out_cache(struct btrfs_root *root, struct inode *inode, ...@@ -1235,7 +1234,6 @@ static int __btrfs_write_out_cache(struct btrfs_root *root, struct inode *inode,
struct btrfs_io_ctl *io_ctl, struct btrfs_io_ctl *io_ctl,
struct btrfs_trans_handle *trans) struct btrfs_trans_handle *trans)
{ {
struct btrfs_fs_info *fs_info = root->fs_info;
struct extent_state *cached_state = NULL; struct extent_state *cached_state = NULL;
LIST_HEAD(bitmap_list); LIST_HEAD(bitmap_list);
int entries = 0; int entries = 0;
...@@ -1293,8 +1291,7 @@ static int __btrfs_write_out_cache(struct btrfs_root *root, struct inode *inode, ...@@ -1293,8 +1291,7 @@ static int __btrfs_write_out_cache(struct btrfs_root *root, struct inode *inode,
* If this changes while we are working we'll get added back to * If this changes while we are working we'll get added back to
* the dirty list and redo it. No locking needed * the dirty list and redo it. No locking needed
*/ */
ret = write_pinned_extent_entries(fs_info, block_group, ret = write_pinned_extent_entries(block_group, io_ctl, &entries);
io_ctl, &entries);
if (ret) if (ret)
goto out_nospc_locked; goto out_nospc_locked;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment