Commit 5e3ee236 authored by Nikolay Borisov's avatar Nikolay Borisov Committed by David Sterba

btrfs: sink extent_write_locked_range tree parameter

This function is called only from submit_compressed_extents and the
io tree being passed is always that of the inode. But we are also
passing the inode, so just move getting the io tree pointer in
extent_write_locked_range to simplify the signature.
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 3e798068
...@@ -4073,11 +4073,12 @@ int extent_write_full_page(struct extent_io_tree *tree, struct page *page, ...@@ -4073,11 +4073,12 @@ int extent_write_full_page(struct extent_io_tree *tree, struct page *page,
return ret; return ret;
} }
int extent_write_locked_range(struct extent_io_tree *tree, struct inode *inode, int extent_write_locked_range(struct inode *inode, u64 start, u64 end,
u64 start, u64 end, int mode) int mode)
{ {
int ret = 0; int ret = 0;
struct address_space *mapping = inode->i_mapping; struct address_space *mapping = inode->i_mapping;
struct extent_io_tree *tree = &BTRFS_I(inode)->io_tree;
struct page *page; struct page *page;
unsigned long nr_pages = (end - start + PAGE_SIZE) >> unsigned long nr_pages = (end - start + PAGE_SIZE) >>
PAGE_SHIFT; PAGE_SHIFT;
......
...@@ -405,8 +405,8 @@ int extent_invalidatepage(struct extent_io_tree *tree, ...@@ -405,8 +405,8 @@ int extent_invalidatepage(struct extent_io_tree *tree,
struct page *page, unsigned long offset); struct page *page, unsigned long offset);
int extent_write_full_page(struct extent_io_tree *tree, struct page *page, int extent_write_full_page(struct extent_io_tree *tree, struct page *page,
struct writeback_control *wbc); struct writeback_control *wbc);
int extent_write_locked_range(struct extent_io_tree *tree, struct inode *inode, int extent_write_locked_range(struct inode *inode, u64 start, u64 end,
u64 start, u64 end, int mode); int mode);
int extent_writepages(struct extent_io_tree *tree, int extent_writepages(struct extent_io_tree *tree,
struct address_space *mapping, struct address_space *mapping,
struct writeback_control *wbc); struct writeback_control *wbc);
......
...@@ -770,8 +770,8 @@ static noinline void submit_compressed_extents(struct inode *inode, ...@@ -770,8 +770,8 @@ static noinline void submit_compressed_extents(struct inode *inode,
* all those pages down to the drive. * all those pages down to the drive.
*/ */
if (!page_started && !ret) if (!page_started && !ret)
extent_write_locked_range(io_tree, extent_write_locked_range(inode,
inode, async_extent->start, async_extent->start,
async_extent->start + async_extent->start +
async_extent->ram_size - 1, async_extent->ram_size - 1,
WB_SYNC_ALL); WB_SYNC_ALL);
......
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