diff options
author | Josef Bacik <josef@toxicpanda.com> | 2022-09-09 17:53:41 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-09-26 12:28:05 +0200 |
commit | 994bcd1eae5bc6f24a90765b1fb8be471ab56b33 (patch) | |
tree | 1215fc60cd4f6ad26a4ccacd17ea175957d3da8f /fs/btrfs/extent-io-tree.h | |
parent | dbbf49928f2eb118036766fae503be1314620cce (diff) |
btrfs: remove failed_start argument from set_extent_bit
This is only used for internal locking related helpers, everybody else
just passes in NULL. I've changed set_extent_bit to __set_extent_bit
and made it static, removed failed_start from set_extent_bit and have it
call __set_extent_bit with a NULL failed_start, and I've moved some code
down below the now static __set_extent_bit.
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent-io-tree.h')
-rw-r--r-- | fs/btrfs/extent-io-tree.h | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/fs/btrfs/extent-io-tree.h b/fs/btrfs/extent-io-tree.h index 02dc4a48ad4f..14de2e107a59 100644 --- a/fs/btrfs/extent-io-tree.h +++ b/fs/btrfs/extent-io-tree.h @@ -160,22 +160,19 @@ static inline int clear_extent_bits(struct extent_io_tree *tree, u64 start, int set_record_extent_bits(struct extent_io_tree *tree, u64 start, u64 end, u32 bits, struct extent_changeset *changeset); int set_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, - u32 bits, u64 *failed_start, - struct extent_state **cached_state, gfp_t mask, + u32 bits, struct extent_state **cached_state, gfp_t mask, struct extent_changeset *changeset); static inline int set_extent_bits_nowait(struct extent_io_tree *tree, u64 start, u64 end, u32 bits) { - return set_extent_bit(tree, start, end, bits, NULL, NULL, GFP_NOWAIT, - NULL); + return set_extent_bit(tree, start, end, bits, NULL, GFP_NOWAIT, NULL); } static inline int set_extent_bits(struct extent_io_tree *tree, u64 start, u64 end, u32 bits) { - return set_extent_bit(tree, start, end, bits, NULL, NULL, GFP_NOFS, - NULL); + return set_extent_bit(tree, start, end, bits, NULL, GFP_NOFS, NULL); } static inline int clear_extent_uptodate(struct extent_io_tree *tree, u64 start, @@ -188,8 +185,7 @@ static inline int clear_extent_uptodate(struct extent_io_tree *tree, u64 start, static inline int set_extent_dirty(struct extent_io_tree *tree, u64 start, u64 end, gfp_t mask) { - return set_extent_bit(tree, start, end, EXTENT_DIRTY, NULL, NULL, mask, - NULL); + return set_extent_bit(tree, start, end, EXTENT_DIRTY, NULL, mask, NULL); } static inline int clear_extent_dirty(struct extent_io_tree *tree, u64 start, @@ -210,7 +206,7 @@ static inline int set_extent_delalloc(struct extent_io_tree *tree, u64 start, { return set_extent_bit(tree, start, end, EXTENT_DELALLOC | extra_bits, - NULL, cached_state, GFP_NOFS, NULL); + cached_state, GFP_NOFS, NULL); } static inline int set_extent_defrag(struct extent_io_tree *tree, u64 start, @@ -218,20 +214,20 @@ static inline int set_extent_defrag(struct extent_io_tree *tree, u64 start, { return set_extent_bit(tree, start, end, EXTENT_DELALLOC | EXTENT_DEFRAG, - NULL, cached_state, GFP_NOFS, NULL); + cached_state, GFP_NOFS, NULL); } static inline int set_extent_new(struct extent_io_tree *tree, u64 start, u64 end) { - return set_extent_bit(tree, start, end, EXTENT_NEW, NULL, NULL, - GFP_NOFS, NULL); + return set_extent_bit(tree, start, end, EXTENT_NEW, NULL, GFP_NOFS, + NULL); } static inline int set_extent_uptodate(struct extent_io_tree *tree, u64 start, u64 end, struct extent_state **cached_state, gfp_t mask) { - return set_extent_bit(tree, start, end, EXTENT_UPTODATE, NULL, + return set_extent_bit(tree, start, end, EXTENT_UPTODATE, cached_state, mask, NULL); } |