btrfs: remove pointless writepages callback wrapper
authorFilipe Manana <fdmanana@suse.com>
Mon, 18 Mar 2024 11:58:28 +0000 (11:58 +0000)
committerDavid Sterba <dsterba@suse.com>
Tue, 7 May 2024 19:31:00 +0000 (21:31 +0200)
There's no point in having a static writepages callback in inode.c that
does nothing besides calling extent_writepages from extent_io.c.
So just remove the callback at inode.c and rename extent_writepages()
to btrfs_writepages().

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@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 f863eefe0f1cc4c2b52e06884d38c98fa41e54a1..7bc23e26a53063cb4c816c37138688541c3eb835 100644 (file)
@@ -2246,8 +2246,7 @@ next_page:
        submit_write_bio(&bio_ctrl, found_error ? ret : 0);
 }
 
-int extent_writepages(struct address_space *mapping,
-                     struct writeback_control *wbc)
+int btrfs_writepages(struct address_space *mapping, struct writeback_control *wbc)
 {
        struct inode *inode = mapping->host;
        int ret = 0;
index eb123b0499e1914b9b0330f52f6c4158ae1190c7..818431b37124c059896bbd69b6086713825bc79d 100644 (file)
@@ -237,8 +237,7 @@ int btrfs_read_folio(struct file *file, struct folio *folio);
 void extent_write_locked_range(struct inode *inode, struct page *locked_page,
                               u64 start, u64 end, struct writeback_control *wbc,
                               bool pages_dirty);
-int extent_writepages(struct address_space *mapping,
-                     struct writeback_control *wbc);
+int btrfs_writepages(struct address_space *mapping, struct writeback_control *wbc);
 int btree_write_cache_pages(struct address_space *mapping,
                            struct writeback_control *wbc);
 void btrfs_readahead(struct readahead_control *rac);
index ce923f207e2d033a108c3a90526d5be58a695d42..a6ebaa5438be5a89fa1dda6489ea7d711e06c43d 100644 (file)
@@ -7923,12 +7923,6 @@ static int btrfs_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
        return ret;
 }
 
-static int btrfs_writepages(struct address_space *mapping,
-                           struct writeback_control *wbc)
-{
-       return extent_writepages(mapping, wbc);
-}
-
 /*
  * For release_folio() and invalidate_folio() we have a race window where
  * folio_end_writeback() is called but the subpage spinlock is not yet released.