Commit dbbf4992 authored by Josef Bacik's avatar Josef Bacik Committed by David Sterba

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: default avatarJosef Bacik <josef@toxicpanda.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent c07d1004
...@@ -558,7 +558,7 @@ static struct extent_state *clear_state_bit(struct extent_io_tree *tree, ...@@ -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. * 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, 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, struct extent_state **cached_state,
gfp_t mask, struct extent_changeset *changeset) gfp_t mask, struct extent_changeset *changeset)
{ {
...@@ -568,6 +568,7 @@ int __clear_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, ...@@ -568,6 +568,7 @@ int __clear_extent_bit(struct extent_io_tree *tree, u64 start, u64 end,
u64 last_end; u64 last_end;
int err; int err;
int clear = 0; int clear = 0;
int wake = (bits & EXTENT_LOCKED) ? 1 : 0;
btrfs_debug_check_extent_io_range(tree, start, end); btrfs_debug_check_extent_io_range(tree, start, end);
trace_btrfs_clear_extent_bit(tree, start, end - start + 1, bits); 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, ...@@ -1617,7 +1618,7 @@ int clear_record_extent_bits(struct extent_io_tree *tree, u64 start, u64 end,
*/ */
ASSERT(!(bits & EXTENT_LOCKED)); 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); changeset);
} }
...@@ -1631,7 +1632,7 @@ int try_lock_extent(struct extent_io_tree *tree, u64 start, u64 end) ...@@ -1631,7 +1632,7 @@ int try_lock_extent(struct extent_io_tree *tree, u64 start, u64 end)
if (err == -EEXIST) { if (err == -EEXIST) {
if (failed_start > start) if (failed_start > start)
clear_extent_bit(tree, start, failed_start - 1, clear_extent_bit(tree, start, failed_start - 1,
EXTENT_LOCKED, 1, 0, NULL); EXTENT_LOCKED, 0, NULL);
return 0; return 0;
} }
return 1; return 1;
......
...@@ -121,46 +121,40 @@ int test_range_bit(struct extent_io_tree *tree, u64 start, u64 end, ...@@ -121,46 +121,40 @@ int test_range_bit(struct extent_io_tree *tree, u64 start, u64 end,
int clear_record_extent_bits(struct extent_io_tree *tree, u64 start, u64 end, int clear_record_extent_bits(struct extent_io_tree *tree, u64 start, u64 end,
u32 bits, struct extent_changeset *changeset); u32 bits, struct extent_changeset *changeset);
int __clear_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, 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,
struct extent_state **cached, gfp_t mask, gfp_t mask, struct extent_changeset *changeset);
struct extent_changeset *changeset);
static inline int clear_extent_bit(struct extent_io_tree *tree, u64 start, static inline int clear_extent_bit(struct extent_io_tree *tree, u64 start,
u64 end, u32 bits, int wake, int delete, u64 end, u32 bits, int delete,
struct extent_state **cached) struct extent_state **cached)
{ {
return __clear_extent_bit(tree, start, end, bits, wake, delete, return __clear_extent_bit(tree, start, end, bits, delete, cached,
cached, GFP_NOFS, NULL); GFP_NOFS, NULL);
} }
static inline int unlock_extent(struct extent_io_tree *tree, u64 start, u64 end) static inline int unlock_extent(struct extent_io_tree *tree, u64 start, u64 end)
{ {
return clear_extent_bit(tree, start, end, EXTENT_LOCKED, 1, 0, NULL); return clear_extent_bit(tree, start, end, EXTENT_LOCKED, 0, NULL);
} }
static inline int unlock_extent_cached(struct extent_io_tree *tree, u64 start, static inline int unlock_extent_cached(struct extent_io_tree *tree, u64 start,
u64 end, struct extent_state **cached) u64 end, struct extent_state **cached)
{ {
return __clear_extent_bit(tree, start, end, EXTENT_LOCKED, 1, 0, cached, return __clear_extent_bit(tree, start, end, EXTENT_LOCKED, 0, cached,
GFP_NOFS, NULL); GFP_NOFS, NULL);
} }
static inline int unlock_extent_cached_atomic(struct extent_io_tree *tree, static inline int unlock_extent_cached_atomic(struct extent_io_tree *tree,
u64 start, u64 end, struct extent_state **cached) u64 start, u64 end, struct extent_state **cached)
{ {
return __clear_extent_bit(tree, start, end, EXTENT_LOCKED, 1, 0, cached, return __clear_extent_bit(tree, start, end, EXTENT_LOCKED, 0, cached,
GFP_ATOMIC, NULL); GFP_ATOMIC, NULL);
} }
static inline int clear_extent_bits(struct extent_io_tree *tree, u64 start, static inline int clear_extent_bits(struct extent_io_tree *tree, u64 start,
u64 end, u32 bits) u64 end, u32 bits)
{ {
int wake = 0; return clear_extent_bit(tree, start, end, bits, 0, NULL);
if (bits & EXTENT_LOCKED)
wake = 1;
return clear_extent_bit(tree, start, end, bits, wake, 0, NULL);
} }
int set_record_extent_bits(struct extent_io_tree *tree, u64 start, u64 end, int set_record_extent_bits(struct extent_io_tree *tree, u64 start, u64 end,
...@@ -187,7 +181,7 @@ static inline int set_extent_bits(struct extent_io_tree *tree, u64 start, ...@@ -187,7 +181,7 @@ static inline int set_extent_bits(struct extent_io_tree *tree, u64 start,
static inline int clear_extent_uptodate(struct extent_io_tree *tree, u64 start, static inline int clear_extent_uptodate(struct extent_io_tree *tree, u64 start,
u64 end, struct extent_state **cached_state) u64 end, struct extent_state **cached_state)
{ {
return __clear_extent_bit(tree, start, end, EXTENT_UPTODATE, 0, 0, return __clear_extent_bit(tree, start, end, EXTENT_UPTODATE, 0,
cached_state, GFP_NOFS, NULL); cached_state, GFP_NOFS, NULL);
} }
...@@ -203,7 +197,7 @@ static inline int clear_extent_dirty(struct extent_io_tree *tree, u64 start, ...@@ -203,7 +197,7 @@ static inline int clear_extent_dirty(struct extent_io_tree *tree, u64 start,
{ {
return clear_extent_bit(tree, start, end, return clear_extent_bit(tree, start, end,
EXTENT_DIRTY | EXTENT_DELALLOC | EXTENT_DIRTY | EXTENT_DELALLOC |
EXTENT_DO_ACCOUNTING, 0, 0, cached); EXTENT_DO_ACCOUNTING, 0, cached);
} }
int convert_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, int convert_extent_bit(struct extent_io_tree *tree, u64 start, u64 end,
......
...@@ -487,7 +487,7 @@ void extent_clear_unlock_delalloc(struct btrfs_inode *inode, u64 start, u64 end, ...@@ -487,7 +487,7 @@ void extent_clear_unlock_delalloc(struct btrfs_inode *inode, u64 start, u64 end,
struct page *locked_page, struct page *locked_page,
u32 clear_bits, unsigned long page_ops) u32 clear_bits, unsigned long page_ops)
{ {
clear_extent_bit(&inode->io_tree, start, end, clear_bits, 1, 0, NULL); clear_extent_bit(&inode->io_tree, start, end, clear_bits, 0, NULL);
__process_pages_contig(inode->vfs_inode.i_mapping, locked_page, __process_pages_contig(inode->vfs_inode.i_mapping, locked_page,
start, end, page_ops, NULL); start, end, page_ops, NULL);
...@@ -3399,7 +3399,7 @@ static int try_release_extent_state(struct extent_io_tree *tree, ...@@ -3399,7 +3399,7 @@ static int try_release_extent_state(struct extent_io_tree *tree,
*/ */
ret = __clear_extent_bit(tree, start, end, ret = __clear_extent_bit(tree, start, end,
~(EXTENT_LOCKED | EXTENT_NODATASUM | EXTENT_DELALLOC_NEW), ~(EXTENT_LOCKED | EXTENT_NODATASUM | EXTENT_DELALLOC_NEW),
0, 0, NULL, mask, NULL); 0, NULL, mask, NULL);
/* if clear_extent_bit failed for enomem reasons, /* if clear_extent_bit failed for enomem reasons,
* we can't allow the release to continue. * we can't allow the release to continue.
......
...@@ -382,7 +382,7 @@ static void extent_map_device_clear_bits(struct extent_map *em, unsigned bits) ...@@ -382,7 +382,7 @@ static void extent_map_device_clear_bits(struct extent_map *em, unsigned bits)
__clear_extent_bit(&device->alloc_state, stripe->physical, __clear_extent_bit(&device->alloc_state, stripe->physical,
stripe->physical + stripe_size - 1, bits, stripe->physical + stripe_size - 1, bits,
0, 0, NULL, GFP_NOWAIT, NULL); 0, NULL, GFP_NOWAIT, NULL);
} }
} }
......
...@@ -118,7 +118,7 @@ int btrfs_inode_clear_file_extent_range(struct btrfs_inode *inode, u64 start, ...@@ -118,7 +118,7 @@ int btrfs_inode_clear_file_extent_range(struct btrfs_inode *inode, u64 start,
if (btrfs_fs_incompat(inode->root->fs_info, NO_HOLES)) if (btrfs_fs_incompat(inode->root->fs_info, NO_HOLES))
return 0; return 0;
return clear_extent_bit(&inode->file_extent_tree, start, return clear_extent_bit(&inode->file_extent_tree, start,
start + len - 1, EXTENT_DIRTY, 0, 0, NULL); start + len - 1, EXTENT_DIRTY, 0, NULL);
} }
static inline u32 max_ordered_sum_bytes(struct btrfs_fs_info *fs_info, static inline u32 max_ordered_sum_bytes(struct btrfs_fs_info *fs_info,
......
...@@ -473,7 +473,7 @@ int btrfs_dirty_pages(struct btrfs_inode *inode, struct page **pages, ...@@ -473,7 +473,7 @@ int btrfs_dirty_pages(struct btrfs_inode *inode, struct page **pages,
*/ */
clear_extent_bit(&inode->io_tree, start_pos, end_of_last_block, clear_extent_bit(&inode->io_tree, start_pos, end_of_last_block,
EXTENT_DELALLOC | EXTENT_DO_ACCOUNTING | EXTENT_DEFRAG, EXTENT_DELALLOC | EXTENT_DO_ACCOUNTING | EXTENT_DEFRAG,
0, 0, cached); 0, cached);
err = btrfs_set_extent_delalloc(inode, start_pos, end_of_last_block, err = btrfs_set_extent_delalloc(inode, start_pos, end_of_last_block,
extra_bits, cached); extra_bits, cached);
......
...@@ -1163,7 +1163,7 @@ update_cache_item(struct btrfs_trans_handle *trans, ...@@ -1163,7 +1163,7 @@ update_cache_item(struct btrfs_trans_handle *trans,
ret = btrfs_search_slot(trans, root, &key, path, 0, 1); ret = btrfs_search_slot(trans, root, &key, path, 0, 1);
if (ret < 0) { if (ret < 0) {
clear_extent_bit(&BTRFS_I(inode)->io_tree, 0, inode->i_size - 1, clear_extent_bit(&BTRFS_I(inode)->io_tree, 0, inode->i_size - 1,
EXTENT_DELALLOC, 0, 0, NULL); EXTENT_DELALLOC, 0, NULL);
goto fail; goto fail;
} }
leaf = path->nodes[0]; leaf = path->nodes[0];
...@@ -1176,7 +1176,7 @@ update_cache_item(struct btrfs_trans_handle *trans, ...@@ -1176,7 +1176,7 @@ update_cache_item(struct btrfs_trans_handle *trans,
found_key.offset != offset) { found_key.offset != offset) {
clear_extent_bit(&BTRFS_I(inode)->io_tree, 0, clear_extent_bit(&BTRFS_I(inode)->io_tree, 0,
inode->i_size - 1, EXTENT_DELALLOC, 0, inode->i_size - 1, EXTENT_DELALLOC, 0,
0, NULL); NULL);
btrfs_release_path(path); btrfs_release_path(path);
goto fail; goto fail;
} }
...@@ -1272,7 +1272,7 @@ static int flush_dirty_cache(struct inode *inode) ...@@ -1272,7 +1272,7 @@ static int flush_dirty_cache(struct inode *inode)
ret = btrfs_wait_ordered_range(inode, 0, (u64)-1); ret = btrfs_wait_ordered_range(inode, 0, (u64)-1);
if (ret) if (ret)
clear_extent_bit(&BTRFS_I(inode)->io_tree, 0, inode->i_size - 1, clear_extent_bit(&BTRFS_I(inode)->io_tree, 0, inode->i_size - 1,
EXTENT_DELALLOC, 0, 0, NULL); EXTENT_DELALLOC, 0, NULL);
return ret; return ret;
} }
......
...@@ -1747,7 +1747,7 @@ static int fallback_to_cow(struct btrfs_inode *inode, struct page *locked_page, ...@@ -1747,7 +1747,7 @@ static int fallback_to_cow(struct btrfs_inode *inode, struct page *locked_page,
if (count > 0) if (count > 0)
clear_extent_bit(io_tree, start, end, EXTENT_NORESERVE, clear_extent_bit(io_tree, start, end, EXTENT_NORESERVE,
0, 0, NULL); 0, NULL);
} }
return cow_file_range(inode, locked_page, start, end, page_started, return cow_file_range(inode, locked_page, start, end, page_started,
...@@ -3324,7 +3324,7 @@ int btrfs_finish_ordered_io(struct btrfs_ordered_extent *ordered_extent) ...@@ -3324,7 +3324,7 @@ int btrfs_finish_ordered_io(struct btrfs_ordered_extent *ordered_extent)
!test_bit(BTRFS_ORDERED_TRUNCATED, &ordered_extent->flags)) !test_bit(BTRFS_ORDERED_TRUNCATED, &ordered_extent->flags))
clear_extent_bit(&inode->io_tree, start, end, clear_extent_bit(&inode->io_tree, start, end,
EXTENT_DELALLOC_NEW | EXTENT_ADD_INODE_BYTES, EXTENT_DELALLOC_NEW | EXTENT_ADD_INODE_BYTES,
0, 0, &cached_state); 0, &cached_state);
btrfs_inode_safe_disk_i_size_write(inode, 0); btrfs_inode_safe_disk_i_size_write(inode, 0);
ret = btrfs_update_inode_fallback(trans, root, inode); ret = btrfs_update_inode_fallback(trans, root, inode);
...@@ -3334,8 +3334,7 @@ int btrfs_finish_ordered_io(struct btrfs_ordered_extent *ordered_extent) ...@@ -3334,8 +3334,7 @@ int btrfs_finish_ordered_io(struct btrfs_ordered_extent *ordered_extent)
} }
ret = 0; ret = 0;
out: out:
clear_extent_bit(&inode->io_tree, start, end, clear_bits, clear_extent_bit(&inode->io_tree, start, end, clear_bits, 0,
(clear_bits & EXTENT_LOCKED) ? 1 : 0, 0,
&cached_state); &cached_state);
if (trans) if (trans)
...@@ -4936,7 +4935,7 @@ int btrfs_truncate_block(struct btrfs_inode *inode, loff_t from, loff_t len, ...@@ -4936,7 +4935,7 @@ int btrfs_truncate_block(struct btrfs_inode *inode, loff_t from, loff_t len,
clear_extent_bit(&inode->io_tree, block_start, block_end, clear_extent_bit(&inode->io_tree, block_start, block_end,
EXTENT_DELALLOC | EXTENT_DO_ACCOUNTING | EXTENT_DEFRAG, EXTENT_DELALLOC | EXTENT_DO_ACCOUNTING | EXTENT_DEFRAG,
0, 0, &cached_state); 0, &cached_state);
ret = btrfs_set_extent_delalloc(inode, block_start, block_end, 0, ret = btrfs_set_extent_delalloc(inode, block_start, block_end, 0,
&cached_state); &cached_state);
...@@ -5352,7 +5351,7 @@ static void evict_inode_truncate_pages(struct inode *inode) ...@@ -5352,7 +5351,7 @@ static void evict_inode_truncate_pages(struct inode *inode)
clear_extent_bit(io_tree, start, end, clear_extent_bit(io_tree, start, end,
EXTENT_LOCKED | EXTENT_DELALLOC | EXTENT_LOCKED | EXTENT_DELALLOC |
EXTENT_DO_ACCOUNTING | EXTENT_DEFRAG, 1, 1, EXTENT_DO_ACCOUNTING | EXTENT_DEFRAG, 1,
&cached_state); &cached_state);
cond_resched(); cond_resched();
...@@ -8333,7 +8332,7 @@ static void btrfs_invalidate_folio(struct folio *folio, size_t offset, ...@@ -8333,7 +8332,7 @@ static void btrfs_invalidate_folio(struct folio *folio, size_t offset,
clear_extent_bit(tree, cur, range_end, clear_extent_bit(tree, cur, range_end,
EXTENT_DELALLOC | EXTENT_DELALLOC |
EXTENT_LOCKED | EXTENT_DO_ACCOUNTING | EXTENT_LOCKED | EXTENT_DO_ACCOUNTING |
EXTENT_DEFRAG, 1, 0, &cached_state); EXTENT_DEFRAG, 0, &cached_state);
spin_lock_irq(&inode->ordered_tree.lock); spin_lock_irq(&inode->ordered_tree.lock);
set_bit(BTRFS_ORDERED_TRUNCATED, &ordered->flags); set_bit(BTRFS_ORDERED_TRUNCATED, &ordered->flags);
...@@ -8379,7 +8378,7 @@ static void btrfs_invalidate_folio(struct folio *folio, size_t offset, ...@@ -8379,7 +8378,7 @@ static void btrfs_invalidate_folio(struct folio *folio, size_t offset,
if (!inode_evicting) { if (!inode_evicting) {
clear_extent_bit(tree, cur, range_end, EXTENT_LOCKED | clear_extent_bit(tree, cur, range_end, EXTENT_LOCKED |
EXTENT_DELALLOC | EXTENT_UPTODATE | EXTENT_DELALLOC | EXTENT_UPTODATE |
EXTENT_DO_ACCOUNTING | EXTENT_DEFRAG, 1, EXTENT_DO_ACCOUNTING | EXTENT_DEFRAG,
delete_states, &cached_state); delete_states, &cached_state);
} }
cur = range_end + 1; cur = range_end + 1;
...@@ -8515,7 +8514,7 @@ vm_fault_t btrfs_page_mkwrite(struct vm_fault *vmf) ...@@ -8515,7 +8514,7 @@ vm_fault_t btrfs_page_mkwrite(struct vm_fault *vmf)
*/ */
clear_extent_bit(&BTRFS_I(inode)->io_tree, page_start, end, clear_extent_bit(&BTRFS_I(inode)->io_tree, page_start, end,
EXTENT_DELALLOC | EXTENT_DO_ACCOUNTING | EXTENT_DELALLOC | EXTENT_DO_ACCOUNTING |
EXTENT_DEFRAG, 0, 0, &cached_state); EXTENT_DEFRAG, 0, &cached_state);
ret2 = btrfs_set_extent_delalloc(BTRFS_I(inode), page_start, end, 0, ret2 = btrfs_set_extent_delalloc(BTRFS_I(inode), page_start, end, 0,
&cached_state); &cached_state);
......
...@@ -1616,7 +1616,7 @@ static int defrag_one_locked_target(struct btrfs_inode *inode, ...@@ -1616,7 +1616,7 @@ static int defrag_one_locked_target(struct btrfs_inode *inode,
return ret; return ret;
clear_extent_bit(&inode->io_tree, start, start + len - 1, clear_extent_bit(&inode->io_tree, start, start + len - 1,
EXTENT_DELALLOC | EXTENT_DO_ACCOUNTING | EXTENT_DELALLOC | EXTENT_DO_ACCOUNTING |
EXTENT_DEFRAG, 0, 0, cached_state); EXTENT_DEFRAG, 0, cached_state);
set_extent_defrag(&inode->io_tree, start, start + len - 1, cached_state); set_extent_defrag(&inode->io_tree, start, start + len - 1, cached_state);
/* Update the page status */ /* Update the page status */
......
...@@ -92,7 +92,7 @@ static int copy_inline_to_page(struct btrfs_inode *inode, ...@@ -92,7 +92,7 @@ static int copy_inline_to_page(struct btrfs_inode *inode,
clear_extent_bit(&inode->io_tree, file_offset, range_end, clear_extent_bit(&inode->io_tree, file_offset, range_end,
EXTENT_DELALLOC | EXTENT_DO_ACCOUNTING | EXTENT_DEFRAG, EXTENT_DELALLOC | EXTENT_DO_ACCOUNTING | EXTENT_DEFRAG,
0, 0, NULL); 0, NULL);
ret = btrfs_set_extent_delalloc(inode, file_offset, range_end, 0, NULL); ret = btrfs_set_extent_delalloc(inode, file_offset, range_end, 0, NULL);
if (ret) if (ret)
goto out_unlock; goto out_unlock;
......
...@@ -975,7 +975,7 @@ static int test_extent_accounting(u32 sectorsize, u32 nodesize) ...@@ -975,7 +975,7 @@ static int test_extent_accounting(u32 sectorsize, u32 nodesize)
BTRFS_MAX_EXTENT_SIZE >> 1, BTRFS_MAX_EXTENT_SIZE >> 1,
(BTRFS_MAX_EXTENT_SIZE >> 1) + sectorsize - 1, (BTRFS_MAX_EXTENT_SIZE >> 1) + sectorsize - 1,
EXTENT_DELALLOC | EXTENT_DELALLOC_NEW | EXTENT_DELALLOC | EXTENT_DELALLOC_NEW |
EXTENT_UPTODATE, 0, 0, NULL); EXTENT_UPTODATE, 0, NULL);
if (ret) { if (ret) {
test_err("clear_extent_bit returned %d", ret); test_err("clear_extent_bit returned %d", ret);
goto out; goto out;
...@@ -1043,7 +1043,7 @@ static int test_extent_accounting(u32 sectorsize, u32 nodesize) ...@@ -1043,7 +1043,7 @@ static int test_extent_accounting(u32 sectorsize, u32 nodesize)
BTRFS_MAX_EXTENT_SIZE + sectorsize, BTRFS_MAX_EXTENT_SIZE + sectorsize,
BTRFS_MAX_EXTENT_SIZE + 2 * sectorsize - 1, BTRFS_MAX_EXTENT_SIZE + 2 * sectorsize - 1,
EXTENT_DELALLOC | EXTENT_DELALLOC_NEW | EXTENT_DELALLOC | EXTENT_DELALLOC_NEW |
EXTENT_UPTODATE, 0, 0, NULL); EXTENT_UPTODATE, 0, NULL);
if (ret) { if (ret) {
test_err("clear_extent_bit returned %d", ret); test_err("clear_extent_bit returned %d", ret);
goto out; goto out;
...@@ -1076,7 +1076,7 @@ static int test_extent_accounting(u32 sectorsize, u32 nodesize) ...@@ -1076,7 +1076,7 @@ static int test_extent_accounting(u32 sectorsize, u32 nodesize)
/* Empty */ /* Empty */
ret = clear_extent_bit(&BTRFS_I(inode)->io_tree, 0, (u64)-1, ret = clear_extent_bit(&BTRFS_I(inode)->io_tree, 0, (u64)-1,
EXTENT_DELALLOC | EXTENT_DELALLOC_NEW | EXTENT_DELALLOC | EXTENT_DELALLOC_NEW |
EXTENT_UPTODATE, 0, 0, NULL); EXTENT_UPTODATE, 0, NULL);
if (ret) { if (ret) {
test_err("clear_extent_bit returned %d", ret); test_err("clear_extent_bit returned %d", ret);
goto out; goto out;
...@@ -1092,7 +1092,7 @@ static int test_extent_accounting(u32 sectorsize, u32 nodesize) ...@@ -1092,7 +1092,7 @@ static int test_extent_accounting(u32 sectorsize, u32 nodesize)
if (ret) if (ret)
clear_extent_bit(&BTRFS_I(inode)->io_tree, 0, (u64)-1, clear_extent_bit(&BTRFS_I(inode)->io_tree, 0, (u64)-1,
EXTENT_DELALLOC | EXTENT_DELALLOC_NEW | EXTENT_DELALLOC | EXTENT_DELALLOC_NEW |
EXTENT_UPTODATE, 0, 0, NULL); EXTENT_UPTODATE, 0, NULL);
iput(inode); iput(inode);
btrfs_free_dummy_root(root); btrfs_free_dummy_root(root);
btrfs_free_dummy_fs_info(fs_info); btrfs_free_dummy_fs_info(fs_info);
......
...@@ -1116,7 +1116,7 @@ static int __btrfs_wait_marked_extents(struct btrfs_fs_info *fs_info, ...@@ -1116,7 +1116,7 @@ static int __btrfs_wait_marked_extents(struct btrfs_fs_info *fs_info,
* it's safe to do it (through extent_io_tree_release()). * it's safe to do it (through extent_io_tree_release()).
*/ */
err = clear_extent_bit(dirty_pages, start, end, err = clear_extent_bit(dirty_pages, start, end,
EXTENT_NEED_WAIT, 0, 0, &cached_state); EXTENT_NEED_WAIT, 0, &cached_state);
if (err == -ENOMEM) if (err == -ENOMEM)
err = 0; err = 0;
if (!err) if (!err)
......
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