Commit 8882679e authored by Nikolay Borisov's avatar Nikolay Borisov Committed by David Sterba

btrfs: Remove EXTENT_IOBITS

This flag just became synonymous to EXTENT_LOCKED, so just remove it and
used EXTENT_LOCKED directly. No functional changes.
Signed-off-by: default avatarNikolay Borisov <nborisov@suse.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 4e586ca3
...@@ -403,7 +403,7 @@ static void merge_state(struct extent_io_tree *tree, ...@@ -403,7 +403,7 @@ static void merge_state(struct extent_io_tree *tree,
struct extent_state *other; struct extent_state *other;
struct rb_node *other_node; struct rb_node *other_node;
if (state->state & (EXTENT_IOBITS | EXTENT_BOUNDARY)) if (state->state & (EXTENT_LOCKED | EXTENT_BOUNDARY))
return; return;
other_node = rb_prev(&state->rb_node); other_node = rb_prev(&state->rb_node);
...@@ -622,7 +622,7 @@ int __clear_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, ...@@ -622,7 +622,7 @@ int __clear_extent_bit(struct extent_io_tree *tree, u64 start, u64 end,
if (delete) if (delete)
bits |= ~EXTENT_CTLBITS; bits |= ~EXTENT_CTLBITS;
if (bits & (EXTENT_IOBITS | EXTENT_BOUNDARY)) if (bits & (EXTENT_LOCKED | EXTENT_BOUNDARY))
clear = 1; clear = 1;
again: again:
if (!prealloc && gfpflags_allow_blocking(mask)) { if (!prealloc && gfpflags_allow_blocking(mask)) {
...@@ -854,7 +854,7 @@ static void cache_state(struct extent_state *state, ...@@ -854,7 +854,7 @@ static void cache_state(struct extent_state *state,
struct extent_state **cached_ptr) struct extent_state **cached_ptr)
{ {
return cache_state_if_flags(state, cached_ptr, return cache_state_if_flags(state, cached_ptr,
EXTENT_IOBITS | EXTENT_BOUNDARY); EXTENT_LOCKED | EXTENT_BOUNDARY);
} }
/* /*
...@@ -4173,10 +4173,9 @@ static int try_release_extent_state(struct extent_io_tree *tree, ...@@ -4173,10 +4173,9 @@ static int try_release_extent_state(struct extent_io_tree *tree,
u64 end = start + PAGE_SIZE - 1; u64 end = start + PAGE_SIZE - 1;
int ret = 1; int ret = 1;
if (test_range_bit(tree, start, end, if (test_range_bit(tree, start, end, EXTENT_LOCKED, 0, NULL)) {
EXTENT_IOBITS, 0, NULL))
ret = 0; ret = 0;
else { } else {
/* /*
* at this point we can safely clear everything except the * at this point we can safely clear everything except the
* locked bit and the nodatasum bit * locked bit and the nodatasum bit
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#define EXTENT_QGROUP_RESERVED (1U << 12) #define EXTENT_QGROUP_RESERVED (1U << 12)
#define EXTENT_CLEAR_DATA_RESV (1U << 13) #define EXTENT_CLEAR_DATA_RESV (1U << 13)
#define EXTENT_DELALLOC_NEW (1U << 14) #define EXTENT_DELALLOC_NEW (1U << 14)
#define EXTENT_IOBITS (EXTENT_LOCKED)
#define EXTENT_DO_ACCOUNTING (EXTENT_CLEAR_META_RESV | \ #define EXTENT_DO_ACCOUNTING (EXTENT_CLEAR_META_RESV | \
EXTENT_CLEAR_DATA_RESV) EXTENT_CLEAR_DATA_RESV)
#define EXTENT_CTLBITS (EXTENT_DO_ACCOUNTING) #define EXTENT_CTLBITS (EXTENT_DO_ACCOUNTING)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment