From 83cc5a54899db7699d442ef454c4489e827fc28e Mon Sep 17 00:00:00 2001 From: Josef Bacik Date: Wed, 23 Nov 2022 17:37:26 -0500 Subject: [PATCH] btrfs-progs: delete state_private code We used to store random private things into extent_states, but we haven't done this for a while and there are no users of this code, simply delete it. Signed-off-by: Josef Bacik Signed-off-by: David Sterba --- kernel-shared/extent_io.c | 42 --------------------------------------- kernel-shared/extent_io.h | 2 -- 2 files changed, 44 deletions(-) diff --git a/kernel-shared/extent_io.c b/kernel-shared/extent_io.c index d36a32c4..e9f23cce 100644 --- a/kernel-shared/extent_io.c +++ b/kernel-shared/extent_io.c @@ -592,48 +592,6 @@ int test_range_bit(struct extent_io_tree *tree, u64 start, u64 end, return bitset; } -int set_state_private(struct extent_io_tree *tree, u64 start, u64 private) -{ - struct cache_extent *node; - struct extent_state *state; - int ret = 0; - - node = search_cache_extent(&tree->state, start); - if (!node) { - ret = -ENOENT; - goto out; - } - state = container_of(node, struct extent_state, cache_node); - if (state->start != start) { - ret = -ENOENT; - goto out; - } - state->xprivate = private; -out: - return ret; -} - -int get_state_private(struct extent_io_tree *tree, u64 start, u64 *private) -{ - struct cache_extent *node; - struct extent_state *state; - int ret = 0; - - node = search_cache_extent(&tree->state, start); - if (!node) { - ret = -ENOENT; - goto out; - } - state = container_of(node, struct extent_state, cache_node); - if (state->start != start) { - ret = -ENOENT; - goto out; - } - *private = state->xprivate; -out: - return ret; -} - static struct extent_buffer *__alloc_extent_buffer(struct btrfs_fs_info *info, u64 bytenr, u32 blocksize) { diff --git a/kernel-shared/extent_io.h b/kernel-shared/extent_io.h index 1c7dbc51..4529919a 100644 --- a/kernel-shared/extent_io.h +++ b/kernel-shared/extent_io.h @@ -127,8 +127,6 @@ static inline int extent_buffer_uptodate(struct extent_buffer *eb) return 0; } -int set_state_private(struct extent_io_tree *tree, u64 start, u64 xprivate); -int get_state_private(struct extent_io_tree *tree, u64 start, u64 *xprivate); struct extent_buffer *find_extent_buffer(struct btrfs_fs_info *fs_info, u64 bytenr, u32 blocksize); struct extent_buffer *find_first_extent_buffer(struct btrfs_fs_info *fs_info,