diff options
author | David Sterba <dsterba@suse.com> | 2017-11-30 18:00:02 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-01-22 16:08:18 +0100 |
commit | aab6e9edf07f2f4747fbc4aa04e14683fbe0c8ac (patch) | |
tree | 4233c56408b441dcff3e4bf17bed1831a141c66f /fs/btrfs/extent_io.c | |
parent | 935db8531fa4d6cc951729a2b5063b6406b71432 (diff) | |
download | linux-aab6e9edf07f2f4747fbc4aa04e14683fbe0c8ac.tar.bz2 |
btrfs: unify extent_page_data type passed as void
Functions called from extent_write_cache_pages used void* as generic
callback data, but all of them convert it to extent_page_data, or use it
directly.
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r-- | fs/btrfs/extent_io.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 0ceb427a8e63..eee9cc5db9ff 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -138,7 +138,7 @@ static void add_extent_changeset(struct extent_state *state, unsigned bits, BUG_ON(ret < 0); } -static void flush_write_bio(void *data); +static void flush_write_bio(struct extent_page_data *epd); static inline struct btrfs_fs_info * tree_fs_info(struct extent_io_tree *tree) @@ -3456,10 +3456,9 @@ done: * and the end_io handler clears the writeback ranges */ static int __extent_writepage(struct page *page, struct writeback_control *wbc, - void *data) + struct extent_page_data *epd) { struct inode *inode = page->mapping->host; - struct extent_page_data *epd = data; u64 start = page_offset(page); u64 page_end = start + PAGE_SIZE - 1; int ret; @@ -3905,7 +3904,7 @@ retry: */ static int extent_write_cache_pages(struct address_space *mapping, struct writeback_control *wbc, - void *data) + struct extent_page_data *epd) { struct inode *inode = mapping->host; int ret = 0; @@ -3969,7 +3968,7 @@ retry: * mapping */ if (!trylock_page(page)) { - flush_write_bio(data); + flush_write_bio(epd); lock_page(page); } @@ -3980,7 +3979,7 @@ retry: if (wbc->sync_mode != WB_SYNC_NONE) { if (PageWriteback(page)) - flush_write_bio(data); + flush_write_bio(epd); wait_on_page_writeback(page); } @@ -3990,7 +3989,7 @@ retry: continue; } - ret = __extent_writepage(page, wbc, data); + ret = __extent_writepage(page, wbc, epd); if (unlikely(ret == AOP_WRITEPAGE_ACTIVATE)) { unlock_page(page); @@ -4038,10 +4037,8 @@ retry: return ret; } -static void flush_write_bio(void *data) +static void flush_write_bio(struct extent_page_data *epd) { - struct extent_page_data *epd = data; - if (epd->bio) { int ret; |