diff options
author | Josef Bacik <josef@toxicpanda.com> | 2022-09-09 17:53:40 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-09-26 12:28:04 +0200 |
commit | dbbf49928f2eb118036766fae503be1314620cce (patch) | |
tree | 211634eea727190608dfd51f4ab0be0689d9751f /fs/btrfs/extent-io-tree.c | |
parent | c07d1004c55cd081aae9334227eabc1588179a65 (diff) |
btrfs: remove the wake argument from clear_extent_bits
This is only used in the case that we are clearing EXTENT_LOCKED, so
infer this value from the bits passed in instead of taking it as an
argument.
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.c')
-rw-r--r-- | fs/btrfs/extent-io-tree.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/btrfs/extent-io-tree.c b/fs/btrfs/extent-io-tree.c index 76bc258711ae..80c260adab70 100644 --- a/fs/btrfs/extent-io-tree.c +++ b/fs/btrfs/extent-io-tree.c @@ -558,7 +558,7 @@ static struct extent_state *clear_state_bit(struct extent_io_tree *tree, * This takes the tree lock, and returns 0 on success and < 0 on error. */ int __clear_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, - u32 bits, int wake, int delete, + u32 bits, int delete, struct extent_state **cached_state, gfp_t mask, struct extent_changeset *changeset) { @@ -568,6 +568,7 @@ int __clear_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, u64 last_end; int err; int clear = 0; + int wake = (bits & EXTENT_LOCKED) ? 1 : 0; btrfs_debug_check_extent_io_range(tree, start, end); trace_btrfs_clear_extent_bit(tree, start, end - start + 1, bits); @@ -1617,7 +1618,7 @@ int clear_record_extent_bits(struct extent_io_tree *tree, u64 start, u64 end, */ ASSERT(!(bits & EXTENT_LOCKED)); - return __clear_extent_bit(tree, start, end, bits, 0, 0, NULL, GFP_NOFS, + return __clear_extent_bit(tree, start, end, bits, 0, NULL, GFP_NOFS, changeset); } @@ -1631,7 +1632,7 @@ int try_lock_extent(struct extent_io_tree *tree, u64 start, u64 end) if (err == -EEXIST) { if (failed_start > start) clear_extent_bit(tree, start, failed_start - 1, - EXTENT_LOCKED, 1, 0, NULL); + EXTENT_LOCKED, 0, NULL); return 0; } return 1; |