All of lore.kernel.org
 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 13/17] btrfs: Remove fs_info argument from remove_free_space_extent
Date: Thu, 10 May 2018 15:44:52 +0300	[thread overview]
Message-ID: <1525956296-32118-14-git-send-email-nborisov@suse.com> (raw)
In-Reply-To: <1525956296-32118-1-git-send-email-nborisov@suse.com>

This function takes a transaction handle which already has a reference
to the fs_info. Use it and remove the extra argument.

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

diff --git a/fs/btrfs/free-space-tree.c b/fs/btrfs/free-space-tree.c
index 4d6f8cbb77d7..f0260cfcf7eb 100644
--- a/fs/btrfs/free-space-tree.c
+++ b/fs/btrfs/free-space-tree.c
@@ -690,12 +690,11 @@ static int modify_free_space_bitmap(struct btrfs_trans_handle *trans,
 }
 
 static int remove_free_space_extent(struct btrfs_trans_handle *trans,
-				    struct btrfs_fs_info *fs_info,
 				    struct btrfs_block_group_cache *block_group,
 				    struct btrfs_path *path,
 				    u64 start, u64 size)
 {
-	struct btrfs_root *root = fs_info->free_space_root;
+	struct btrfs_root *root = trans->fs_info->free_space_root;
 	struct btrfs_key key;
 	u64 found_start, found_end;
 	u64 end = start + size;
@@ -801,8 +800,8 @@ int __remove_from_free_space_tree(struct btrfs_trans_handle *trans,
 		return modify_free_space_bitmap(trans, block_group, path,
 						start, size, 1);
 	} else {
-		return remove_free_space_extent(trans, fs_info, block_group,
-						path, start, size);
+		return remove_free_space_extent(trans, block_group, path,
+						start, size);
 	}
 }
 
-- 
2.7.4


  parent reply	other threads:[~2018-05-10 12:45 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-10 12:44 [PATCH 00/17] Freespace tree big fs_info cleanup Nikolay Borisov
2018-05-10 12:44 ` [PATCH 01/17] btrfs: Make btrfs_init_dummy_trans initialize trans' fs_info field Nikolay Borisov
2018-05-10 12:44 ` [PATCH 02/17] btrfs: Remove fs_info argument from add_block_group_free_space Nikolay Borisov
2018-05-10 12:44 ` [PATCH 03/17] btrfs: Remove fs_info argument from __add_block_group_free_space Nikolay Borisov
2018-05-10 12:44 ` [PATCH 04/17] btrfs: Remove fs_info argument from __add_to_free_space_tree Nikolay Borisov
2018-05-10 12:44 ` [PATCH 05/17] btrfs: Remove fs_info parameter from add_new_free_space_info Nikolay Borisov
2018-05-10 12:44 ` [PATCH 06/17] btrfs: Remove fs_info argument from add_new_free_space Nikolay Borisov
2018-05-10 12:44 ` [PATCH 07/17] btrfs: Remove fs_info parameter from remove_block_group_free_space Nikolay Borisov
2018-05-10 12:44 ` [PATCH 08/17] btrfs: Remove fs_info argument from convert_free_space_to_bitmaps Nikolay Borisov
2018-05-10 12:44 ` [PATCH 09/17] btrfs: Remove fs_info parameter from convert_free_space_to_extents Nikolay Borisov
2018-05-10 12:44 ` [PATCH 10/17] btrfs: Remove fs_info argument from update_free_space_extent_count Nikolay Borisov
2018-05-10 12:44 ` [PATCH 11/17] btrfs: Remove fs_info argument from modify_free_space_bitmap Nikolay Borisov
2018-05-10 12:44 ` [PATCH 12/17] btrfs: Remove fs_info argument from add_free_space_extent Nikolay Borisov
2018-05-10 12:44 ` Nikolay Borisov [this message]
2018-05-10 12:44 ` [PATCH 14/17] btrfs: Remove fs_info argument from __remove_from_free_space_tree Nikolay Borisov
2018-05-10 12:44 ` [PATCH 15/17] btrfs: Remove fs_info argument from remove_from_free_space_tree Nikolay Borisov
2018-05-10 12:44 ` [PATCH 16/17] btrfs: Remove fs_info argument from add_to_free_space_tree Nikolay Borisov
2018-05-10 12:44 ` [PATCH 17/17] btrfs: Remove fs_info argument from populate_free_space_tree Nikolay Borisov
2018-05-11 12:12 ` [PATCH 00/17] Freespace tree big fs_info cleanup 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=1525956296-32118-14-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.