mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
btrfs: add a cached state to extent_clear_unlock_delalloc
Now that we have the lock_extent tightly coupled with extent_clear_unlock_delalloc we can add a cached state to extent_clear_unlock_delalloc and benefit from skipping the extra lookup when we're doing cow. Reviewed-by: Goldwyn Rodrigues <rgoldwyn@suse.com> Signed-off-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
committed by
David Sterba
parent
8325f41a56
commit
6b0a63a4fa
@@ -412,9 +412,10 @@ out_failed:
|
||||
|
||||
void extent_clear_unlock_delalloc(struct btrfs_inode *inode, u64 start, u64 end,
|
||||
struct page *locked_page,
|
||||
struct extent_state **cached,
|
||||
u32 clear_bits, unsigned long page_ops)
|
||||
{
|
||||
clear_extent_bit(&inode->io_tree, start, end, clear_bits, NULL);
|
||||
clear_extent_bit(&inode->io_tree, start, end, clear_bits, cached);
|
||||
|
||||
__process_pages_contig(inode->vfs_inode.i_mapping, locked_page,
|
||||
start, end, page_ops);
|
||||
|
||||
Reference in New Issue
Block a user