btrfs: Remove tree argument from extent_writepages
authorNikolay Borisov <nborisov@suse.com>
Thu, 19 Apr 2018 07:46:38 +0000 (10:46 +0300)
committerDavid Sterba <dsterba@suse.com>
Mon, 28 May 2018 16:07:20 +0000 (18:07 +0200)
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>
fs/btrfs/extent_io.c
fs/btrfs/extent_io.h
fs/btrfs/inode.c

index 20bb056b7ecac27180cccfc570f6d8cf98992a68..af2f0408c6e46688029eafa736301fa54da014c1 100644 (file)
@@ -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,
        };
index 752ad87e40d56d6861715a339ea58356664bd8df..0bfd4aeb822dd95f42e1cbe9ecc76fb5dc06a41d 100644 (file)
@@ -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);
index 0aadf17c528febd7f06340d187ac31df5d5220f4..775249f03dd321616df3a19a2089e66d68c3d808 100644 (file)
@@ -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