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 1/4] btrfs: Remove fs_info argument from alloc_reserved_tree_block
Date: Mon, 21 May 2018 12:27:20 +0300	[thread overview]
Message-ID: <1526894843-8732-2-git-send-email-nborisov@suse.com> (raw)
In-Reply-To: <1526894843-8732-1-git-send-email-nborisov@suse.com>

This function already takes a transaction handle which contains a
reference to the fs_info. So use this and remove the extra argument.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
---
 fs/btrfs/extent-tree.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index ff26fed6196a..e80fbfa11a89 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -66,7 +66,6 @@ static int alloc_reserved_file_extent(struct btrfs_trans_handle *trans,
 				      u64 flags, u64 owner, u64 offset,
 				      struct btrfs_key *ins, int ref_mod);
 static int alloc_reserved_tree_block(struct btrfs_trans_handle *trans,
-				     struct btrfs_fs_info *fs_info,
 				     u64 parent, u64 root_objectid,
 				     u64 flags, struct btrfs_disk_key *key,
 				     int level, struct btrfs_key *ins);
@@ -2461,8 +2460,7 @@ static int run_delayed_tree_ref(struct btrfs_trans_handle *trans,
 	}
 	if (node->action == BTRFS_ADD_DELAYED_REF && insert_reserved) {
 		BUG_ON(!extent_op || !extent_op->update_flags);
-		ret = alloc_reserved_tree_block(trans, fs_info,
-						parent, ref_root,
+		ret = alloc_reserved_tree_block(trans, parent, ref_root,
 						extent_op->flags_to_set,
 						&extent_op->key,
 						ref->level, &ins);
@@ -8145,11 +8143,11 @@ static int alloc_reserved_file_extent(struct btrfs_trans_handle *trans,
 }
 
 static int alloc_reserved_tree_block(struct btrfs_trans_handle *trans,
-				     struct btrfs_fs_info *fs_info,
 				     u64 parent, u64 root_objectid,
 				     u64 flags, struct btrfs_disk_key *key,
 				     int level, struct btrfs_key *ins)
 {
+	struct btrfs_fs_info *fs_info = trans->fs_info;
 	int ret;
 	struct btrfs_extent_item *extent_item;
 	struct btrfs_tree_block_info *block_info;
-- 
2.7.4


  reply	other threads:[~2018-05-21  9:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-21  9:27 [PATCH 0/4] Cleanup alloc_reserved_tree_block signature Nikolay Borisov
2018-05-21  9:27 ` Nikolay Borisov [this message]
2018-05-22 15:22   ` [PATCH 1/4] btrfs: Remove fs_info argument from alloc_reserved_tree_block David Sterba
2018-05-21  9:27 ` [PATCH 2/4] btrfs: Simplify alloc_reserved_tree_block interface Nikolay Borisov
2018-05-22 15:22   ` David Sterba
2018-05-21  9:27 ` [PATCH 3/4] btrfs: Pass btrfs_delayed_extent_op to alloc_reserved_tree_block Nikolay Borisov
2018-05-22 15:22   ` David Sterba
2018-05-21  9:27 ` [PATCH 4/4] btrfs: Streamline shared ref check in alloc_reserved_tree_block Nikolay Borisov
2018-05-22 15:23   ` David Sterba
2018-05-22 15:26 ` [PATCH 0/4] Cleanup alloc_reserved_tree_block signature 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=1526894843-8732-2-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).