[PATCH 19/31] btrfs: remove temporary exports for extent_state movement

Josef Bacik
2022-09-02T20:17:23Z

Now that the code has been moved we can remove these temporary exports.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
---
fs/btrfs/extent-io-tree.c | 9 +++++++--
fs/btrfs/extent-io-tree.h | 9 ---------
2 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/fs/btrfs/extent-io-tree.c b/fs/btrfs/extent-io-tree.c
index bd015f304142..5f0a00c6aa96 100644
--- a/fs/btrfs/extent-io-tree.c
+++ b/fs/btrfs/extent-io-tree.c
@@ -9,6 +9,11 @@

static struct kmem_cache *extent_state_cache;

+static inline bool extent_state_in_tree(const struct extent_state *state)
+{
+ return !RB_EMPTY_NODE(&state->rb_node);
+}
+
#ifdef CONFIG_BTRFS_DEBUG
static LIST_HEAD(states);
static DEFINE_SPINLOCK(leak_lock);
@@ -123,7 +128,7 @@ void extent_io_tree_release(struct extent_io_tree *tree)
spin_unlock(&tree->lock);
}

-struct extent_state *alloc_extent_state(gfp_t mask)
+static struct extent_state *alloc_extent_state(gfp_t mask)
{
struct extent_state *state;

@@ -144,7 +149,7 @@ struct extent_state *alloc_extent_state(gfp_t mask)
return state;
}

-struct extent_state *alloc_extent_state_atomic(struct extent_state *prealloc)
+static struct extent_state *alloc_extent_state_atomic(struct extent_state *prealloc)
{
if (!prealloc)
prealloc = alloc_extent_state(GFP_ATOMIC);
diff --git a/fs/btrfs/extent-io-tree.h b/fs/btrfs/extent-io-tree.h
index 3b63aeca941a..3b17cc33bcec 100644
--- a/fs/btrfs/extent-io-tree.h
+++ b/fs/btrfs/extent-io-tree.h
@@ -260,13 +260,4 @@ void btrfs_free_io_failure_record(struct btrfs_inode *inode, u64 start,
u64 end);
int btrfs_clean_io_failure(struct btrfs_inode *inode, u64 start,
struct page *page, unsigned int pg_offset);
-
-struct extent_state *alloc_extent_state_atomic(struct extent_state *prealloc);
-struct extent_state *alloc_extent_state(gfp_t mask);
-
-static inline bool extent_state_in_tree(const struct extent_state *state)
-{
- return !RB_EMPTY_NODE(&state->rb_node);
-}
-
#endif /* BTRFS_EXTENT_IO_TREE_H */
--
2.26.3