linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nikolay Borisov <nborisov@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: Nikolay Borisov <nborisov@suse.com>
Subject: [PATCH 11/11] btrfs-progs: Remove fs_info argument from write_ctree_super
Date: Mon, 28 May 2018 09:36:50 +0300	[thread overview]
Message-ID: <1527489410-3564-12-git-send-email-nborisov@suse.com> (raw)
In-Reply-To: <1527489410-3564-1-git-send-email-nborisov@suse.com>

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>
---
 disk-io.c     | 6 +++---
 disk-io.h     | 3 +--
 transaction.c | 2 +-
 3 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/disk-io.c b/disk-io.c
index 456b354cb727..4a609a892be7 100644
--- a/disk-io.c
+++ b/disk-io.c
@@ -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);
 	}
 
diff --git a/disk-io.h b/disk-io.h
index 36fb68cdb86a..fefdb0a75d07 100644
--- a/disk-io.h
+++ b/disk-io.h
@@ -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 ad70572838c1..9619265ef6e8 100644
--- a/transaction.c
+++ b/transaction.c
@@ -168,7 +168,7 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans,
 	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);
-- 
2.7.4


  parent reply	other threads:[~2018-05-28 16:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-28  6:36 [PATCH 00/11] Summer argument cleanup Nikolay Borisov
2018-05-28  6:36 ` [PATCH 01/11] btrfs-progs: check: Remove root argument from delete_extent_records Nikolay Borisov
2018-05-28  6:36 ` [PATCH 02/11] btrfs-progs: check: Remove root parameter from btrfs_fix_block_accounting Nikolay Borisov
2018-05-28  6:36 ` [PATCH 03/11] btrfs-progs: check: Remove root parameter from del_pending_extents Nikolay Borisov
2018-05-28  6:36 ` [PATCH 04/11] btrfs-progs: check: Remove root argument from finish_current_insert Nikolay Borisov
2018-05-28  6:36 ` [PATCH 05/11] btrfs-progs: check: Make update_pinned_extents take btrfs_fs_info Nikolay Borisov
2018-05-28  6:36 ` [PATCH 06/11] btrfs-progs: Remove unused argument from clean_tree_block Nikolay Borisov
2018-05-28  6:36 ` [PATCH 07/11] btrfs-progs: check: Remove unused root argument from btrfs_extent_post_op Nikolay Borisov
2018-05-28  6:36 ` [PATCH 08/11] btrfs-progs: Change btrfs_root to btrfs_fs_info argument in btrfs_lookup_extent_info Nikolay Borisov
2018-05-28  6:36 ` [PATCH 09/11] btrfs-progs: Remove root argument from btrfs_set_block_flags Nikolay Borisov
2018-05-28  6:36 ` [PATCH 10/11] btrfs-progs: Remove root argument from write_one_cache_group Nikolay Borisov
2018-05-28  6:36 ` Nikolay Borisov [this message]
2018-05-29  1:06 ` [PATCH 00/11] Summer argument cleanup Lu Fengqi
2018-05-31 11:34 ` David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1527489410-3564-12-git-send-email-nborisov@suse.com \
    --to=nborisov@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).