Commit 0a9b0e53 authored by Nikolay Borisov's avatar Nikolay Borisov Committed by David Sterba

btrfs: sink extent_write_full_page tree argument

The tree argument passed to extent_write_full_page is referenced from
the page being passed to the same function. Since we already have
enough information to get the reference, remove the function parameter.
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 5e3ee236
...@@ -4056,13 +4056,12 @@ static noinline void flush_write_bio(void *data) ...@@ -4056,13 +4056,12 @@ static noinline void flush_write_bio(void *data)
flush_epd_write_bio(epd); flush_epd_write_bio(epd);
} }
int extent_write_full_page(struct extent_io_tree *tree, struct page *page, int extent_write_full_page(struct page *page, struct writeback_control *wbc)
struct writeback_control *wbc)
{ {
int ret; int ret;
struct extent_page_data epd = { struct extent_page_data epd = {
.bio = NULL, .bio = NULL,
.tree = tree, .tree = &BTRFS_I(page->mapping->host)->io_tree,
.extent_locked = 0, .extent_locked = 0,
.sync_io = wbc->sync_mode == WB_SYNC_ALL, .sync_io = wbc->sync_mode == WB_SYNC_ALL,
}; };
......
...@@ -403,8 +403,7 @@ int find_first_extent_bit(struct extent_io_tree *tree, u64 start, ...@@ -403,8 +403,7 @@ int find_first_extent_bit(struct extent_io_tree *tree, u64 start,
struct extent_state **cached_state); struct extent_state **cached_state);
int extent_invalidatepage(struct extent_io_tree *tree, 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 page *page, struct writeback_control *wbc);
struct writeback_control *wbc);
int extent_write_locked_range(struct inode *inode, u64 start, u64 end, int extent_write_locked_range(struct inode *inode, u64 start, u64 end,
int mode); int mode);
int extent_writepages(struct extent_io_tree *tree, int extent_writepages(struct extent_io_tree *tree,
......
...@@ -8855,7 +8855,6 @@ int btrfs_readpage(struct file *file, struct page *page) ...@@ -8855,7 +8855,6 @@ int btrfs_readpage(struct file *file, struct page *page)
static int btrfs_writepage(struct page *page, struct writeback_control *wbc) static int btrfs_writepage(struct page *page, struct writeback_control *wbc)
{ {
struct extent_io_tree *tree;
struct inode *inode = page->mapping->host; struct inode *inode = page->mapping->host;
int ret; int ret;
...@@ -8874,8 +8873,7 @@ static int btrfs_writepage(struct page *page, struct writeback_control *wbc) ...@@ -8874,8 +8873,7 @@ static int btrfs_writepage(struct page *page, struct writeback_control *wbc)
redirty_page_for_writepage(wbc, page); redirty_page_for_writepage(wbc, page);
return AOP_WRITEPAGE_ACTIVATE; return AOP_WRITEPAGE_ACTIVATE;
} }
tree = &BTRFS_I(page->mapping->host)->io_tree; ret = extent_write_full_page(page, wbc);
ret = extent_write_full_page(tree, page, wbc);
btrfs_add_delayed_iput(inode); btrfs_add_delayed_iput(inode);
return ret; return ret;
} }
......
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