All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: linux-btrfs@vger.kernel.org
Cc: David Sterba <dsterba@suse.cz>
Subject: [PATCH 08/12] btrfs: drop unused parameter from extent_map_tree_init
Date: Fri, 22 Apr 2011 11:42:42 +0200	[thread overview]
Message-ID: <51c3b6e36524bbf6ad863ac3268a95e5f846d85d.1303398927.git.dsterba@suse.cz> (raw)
In-Reply-To: <cover.1303398927.git.dsterba@suse.cz>

the GFP flags are not stored anywhere and all allocations are done via
alloc_extent_map(GFP_NOFS).

Signed-off-by: David Sterba <dsterba@suse.cz>
---
 fs/btrfs/disk-io.c    |    3 +--
 fs/btrfs/extent_map.c |    3 +--
 fs/btrfs/extent_map.h |    2 +-
 fs/btrfs/inode.c      |    2 +-
 fs/btrfs/volumes.c    |    2 +-
 5 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 598deb3..59c5bee 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -1713,8 +1713,7 @@ struct btrfs_root *open_ctree(struct super_block *sb,
 	RB_CLEAR_NODE(&BTRFS_I(fs_info->btree_inode)->rb_node);
 	extent_io_tree_init(&BTRFS_I(fs_info->btree_inode)->io_tree,
 			     fs_info->btree_inode->i_mapping);
-	extent_map_tree_init(&BTRFS_I(fs_info->btree_inode)->extent_tree,
-			     GFP_NOFS);
+	extent_map_tree_init(&BTRFS_I(fs_info->btree_inode)->extent_tree);
 
 	BTRFS_I(fs_info->btree_inode)->io_tree.ops = &btree_extent_io_ops;
 
diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c
index a24a3f2..3c8f374 100644
--- a/fs/btrfs/extent_map.c
+++ b/fs/btrfs/extent_map.c
@@ -28,12 +28,11 @@ void extent_map_exit(void)
 /**
  * extent_map_tree_init - initialize extent map tree
  * @tree:		tree to initialize
- * @mask:		flags for memory allocations during tree operations
  *
  * Initialize the extent tree @tree.  Should be called for each new inode
  * or other user of the extent_map interface.
  */
-void extent_map_tree_init(struct extent_map_tree *tree, gfp_t mask)
+void extent_map_tree_init(struct extent_map_tree *tree)
 {
 	tree->map = RB_ROOT;
 	rwlock_init(&tree->lock);
diff --git a/fs/btrfs/extent_map.h b/fs/btrfs/extent_map.h
index 28b44db..255813c 100644
--- a/fs/btrfs/extent_map.h
+++ b/fs/btrfs/extent_map.h
@@ -49,7 +49,7 @@ static inline u64 extent_map_block_end(struct extent_map *em)
 	return em->block_start + em->block_len;
 }
 
-void extent_map_tree_init(struct extent_map_tree *tree, gfp_t mask);
+void extent_map_tree_init(struct extent_map_tree *tree);
 struct extent_map *lookup_extent_mapping(struct extent_map_tree *tree,
 					 u64 start, u64 len);
 int add_extent_mapping(struct extent_map_tree *tree,
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 137f3ca..4ef41fe 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -6780,7 +6780,7 @@ struct inode *btrfs_alloc_inode(struct super_block *sb)
 	ei->force_compress = BTRFS_COMPRESS_NONE;
 
 	inode = &ei->vfs_inode;
-	extent_map_tree_init(&ei->extent_tree, GFP_NOFS);
+	extent_map_tree_init(&ei->extent_tree);
 	extent_io_tree_init(&ei->io_tree, &inode->i_data);
 	extent_io_tree_init(&ei->io_failure_tree, &inode->i_data);
 	mutex_init(&ei->log_mutex);
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 309a57b..64b30d3 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -2839,7 +2839,7 @@ int btrfs_chunk_readonly(struct btrfs_root *root, u64 chunk_offset)
 
 void btrfs_mapping_init(struct btrfs_mapping_tree *tree)
 {
-	extent_map_tree_init(&tree->map_tree, GFP_NOFS);
+	extent_map_tree_init(&tree->map_tree);
 }
 
 void btrfs_mapping_tree_free(struct btrfs_mapping_tree *tree)
-- 
1.7.5.rc3


  parent reply	other threads:[~2011-04-22  9:42 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-22  9:41 [PATCH 00/12] Cleanups, cruft removal David Sterba
2011-04-22  9:41 ` [PATCH 01/12] btrfs: rename variables clashing with global function names David Sterba
2011-04-22  9:41 ` [PATCH 02/12] btrfs: remove nested duplicate variable declarations David Sterba
2011-04-22  9:41 ` [PATCH 03/12] btrfs: fix dereference before check David Sterba
2011-04-22  9:41 ` [PATCH 04/12] btrfs: unify checking of IS_ERR and null David Sterba
2011-04-22  9:41 ` [PATCH 05/12] btrfs: remove useless mutex lock/unlock sequences David Sterba
2011-04-25  6:25   ` Tsutomu Itoh
2011-04-25 12:12     ` Chris Mason
2011-04-29 16:34       ` David Sterba
2011-05-02 13:49   ` [PATCH] btrfs: Document a mutex lock/unlock sequence David Sterba
2011-04-22  9:41 ` [PATCH 06/12] btrfs: make functions static when possible David Sterba
2011-04-22  9:42 ` [PATCH 07/12] btrfs: drop unused argument from extent_io_tree_init David Sterba
2011-04-22  9:42 ` David Sterba [this message]
2011-04-22  9:42 ` [PATCH 09/12] btrfs: drop gfp parameter from alloc_extent_map David Sterba
2011-04-22  9:42 ` [PATCH 10/12] btrfs: drop gfp parameter from find_extent_buffer David Sterba
2011-04-22  9:43 ` [PATCH 11/12] btrfs: drop gfp parameter from alloc_extent_buffer David Sterba
2011-04-22  9:43 ` [PATCH 12/12] btrfs: drop unused parameter from btrfs_release_path David Sterba
2011-05-02 14:01 ` [PATCH 00/12] Cleanups, cruft removal 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=51c3b6e36524bbf6ad863ac3268a95e5f846d85d.1303398927.git.dsterba@suse.cz \
    --to=dsterba@suse.cz \
    --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.