diff options
author | Nikolay Borisov <nborisov@suse.com> | 2018-05-28 09:36:50 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-06-07 16:37:37 +0200 |
commit | 723cab8a72d2bca14e99ec1320e138ed1ce3c0a6 (patch) | |
tree | 79c39141f52396e8dbc1048e133c873a51e6dff3 | |
parent | 947c2d56a439c87f244ca9d036b40adb27f5fbdc (diff) |
btrfs-progs: Remove fs_info argument from write_ctree_super
This function already takes a transaction handle which has a reference
to the fs_info, so use that to obtain it.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Su Yue <suy.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | disk-io.c | 6 | ||||
-rw-r--r-- | disk-io.h | 3 | ||||
-rw-r--r-- | transaction.c | 2 |
3 files changed, 5 insertions, 6 deletions
@@ -1606,10 +1606,10 @@ int write_all_supers(struct btrfs_fs_info *fs_info) return 0; } -int write_ctree_super(struct btrfs_trans_handle *trans, - struct btrfs_fs_info *fs_info) +int write_ctree_super(struct btrfs_trans_handle *trans) { int ret; + struct btrfs_fs_info *fs_info = trans->fs_info; struct btrfs_root *tree_root = fs_info->tree_root; struct btrfs_root *chunk_root = fs_info->chunk_root; @@ -1657,7 +1657,7 @@ int close_ctree_fs_info(struct btrfs_fs_info *fs_info) BUG_ON(ret); ret = __commit_transaction(trans, root); BUG_ON(ret); - write_ctree_super(trans, fs_info); + write_ctree_super(trans); kfree(trans); } @@ -164,8 +164,7 @@ static inline int close_ctree(struct btrfs_root *root) } int write_all_supers(struct btrfs_fs_info *fs_info); -int write_ctree_super(struct btrfs_trans_handle *trans, - struct btrfs_fs_info *fs_info); +int write_ctree_super(struct btrfs_trans_handle *trans); int btrfs_read_dev_super(int fd, struct btrfs_super_block *sb, u64 sb_bytenr, unsigned sbflags); int btrfs_map_bh_to_logical(struct btrfs_root *root, struct extent_buffer *bh, diff --git a/transaction.c b/transaction.c index ad705728..9619265e 100644 --- a/transaction.c +++ b/transaction.c @@ -168,7 +168,7 @@ commit_tree: BUG_ON(ret); ret = __commit_transaction(trans, root); BUG_ON(ret); - write_ctree_super(trans, fs_info); + write_ctree_super(trans); btrfs_finish_extent_commit(trans, fs_info->extent_root, &fs_info->pinned_extents); kfree(trans); |