btrfs: stop clearing EXTENT_DIRTY in inode I/O tree
Since commit fee187d9d9
("Btrfs: do not set EXTENT_DIRTY along with
EXTENT_DELALLOC"), we never set EXTENT_DIRTY in inode->io_tree, so we
can simplify and stop trying to clear it.
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:

committed by
David Sterba

parent
f50cb7aff9
commit
e182163d9c
@@ -1006,7 +1006,7 @@ update_cache_item(struct btrfs_trans_handle *trans,
|
||||
ret = btrfs_search_slot(trans, root, &key, path, 0, 1);
|
||||
if (ret < 0) {
|
||||
clear_extent_bit(&BTRFS_I(inode)->io_tree, 0, inode->i_size - 1,
|
||||
EXTENT_DIRTY | EXTENT_DELALLOC, 0, 0, NULL);
|
||||
EXTENT_DELALLOC, 0, 0, NULL);
|
||||
goto fail;
|
||||
}
|
||||
leaf = path->nodes[0];
|
||||
@@ -1018,9 +1018,8 @@ update_cache_item(struct btrfs_trans_handle *trans,
|
||||
if (found_key.objectid != BTRFS_FREE_SPACE_OBJECTID ||
|
||||
found_key.offset != offset) {
|
||||
clear_extent_bit(&BTRFS_I(inode)->io_tree, 0,
|
||||
inode->i_size - 1,
|
||||
EXTENT_DIRTY | EXTENT_DELALLOC, 0, 0,
|
||||
NULL);
|
||||
inode->i_size - 1, EXTENT_DELALLOC, 0,
|
||||
0, NULL);
|
||||
btrfs_release_path(path);
|
||||
goto fail;
|
||||
}
|
||||
@@ -1116,7 +1115,7 @@ static int flush_dirty_cache(struct inode *inode)
|
||||
ret = btrfs_wait_ordered_range(inode, 0, (u64)-1);
|
||||
if (ret)
|
||||
clear_extent_bit(&BTRFS_I(inode)->io_tree, 0, inode->i_size - 1,
|
||||
EXTENT_DIRTY | EXTENT_DELALLOC, 0, 0, NULL);
|
||||
EXTENT_DELALLOC, 0, 0, NULL);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user