Skip to content

Commit

Permalink
btrfs: Remove tree argument from extent_writepages
Browse files Browse the repository at this point in the history
It can be directly referenced from the passed address_space so do that.
No functional changes.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
  • Loading branch information
lorddoskias authored and kdave committed May 28, 2018
1 parent 81f1d39 commit 8ae225a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
5 changes: 2 additions & 3 deletions fs/btrfs/extent_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -4109,14 +4109,13 @@ int extent_write_locked_range(struct inode *inode, u64 start, u64 end,
return ret;
}

int extent_writepages(struct extent_io_tree *tree,
struct address_space *mapping,
int extent_writepages(struct address_space *mapping,
struct writeback_control *wbc)
{
int ret = 0;
struct extent_page_data epd = {
.bio = NULL,
.tree = tree,
.tree = &BTRFS_I(mapping->host)->io_tree,
.extent_locked = 0,
.sync_io = wbc->sync_mode == WB_SYNC_ALL,
};
Expand Down
3 changes: 1 addition & 2 deletions fs/btrfs/extent_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,7 @@ int extent_invalidatepage(struct extent_io_tree *tree,
int extent_write_full_page(struct page *page, struct writeback_control *wbc);
int extent_write_locked_range(struct inode *inode, u64 start, u64 end,
int mode);
int extent_writepages(struct extent_io_tree *tree,
struct address_space *mapping,
int extent_writepages(struct address_space *mapping,
struct writeback_control *wbc);
int btree_write_cache_pages(struct address_space *mapping,
struct writeback_control *wbc);
Expand Down
5 changes: 1 addition & 4 deletions fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -8897,10 +8897,7 @@ static int btrfs_writepage(struct page *page, struct writeback_control *wbc)
static int btrfs_writepages(struct address_space *mapping,
struct writeback_control *wbc)
{
struct extent_io_tree *tree;

tree = &BTRFS_I(mapping->host)->io_tree;
return extent_writepages(tree, mapping, wbc);
return extent_writepages(mapping, wbc);
}

static int
Expand Down

0 comments on commit 8ae225a

Please sign in to comment.