Commit a129ffb8 authored by Qu Wenruo's avatar Qu Wenruo Committed by David Sterba

btrfs: remove unused start and end parameters from btrfs_run_delalloc_range()

Since commit d75855b4 ("btrfs: Remove
extent_io_ops::writepage_start_hook") removes the writepage_start_hook()
and adds btrfs_writepage_cow_fixup() function, there is no need to
follow the old hook parameters.

Remove the @start and @end hook, since currently the fixup check is full
page check, it doesn't need @start and @end hook.
Signed-off-by: default avatarQu Wenruo <wqu@suse.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent a7d1c5dc
...@@ -3192,7 +3192,7 @@ int btrfs_prealloc_file_range_trans(struct inode *inode, ...@@ -3192,7 +3192,7 @@ int btrfs_prealloc_file_range_trans(struct inode *inode,
int btrfs_run_delalloc_range(struct btrfs_inode *inode, struct page *locked_page, int btrfs_run_delalloc_range(struct btrfs_inode *inode, struct page *locked_page,
u64 start, u64 end, int *page_started, unsigned long *nr_written, u64 start, u64 end, int *page_started, unsigned long *nr_written,
struct writeback_control *wbc); struct writeback_control *wbc);
int btrfs_writepage_cow_fixup(struct page *page, u64 start, u64 end); int btrfs_writepage_cow_fixup(struct page *page);
void btrfs_writepage_endio_finish_ordered(struct btrfs_inode *inode, void btrfs_writepage_endio_finish_ordered(struct btrfs_inode *inode,
struct page *page, u64 start, struct page *page, u64 start,
u64 end, int uptodate); u64 end, int uptodate);
......
...@@ -3828,9 +3828,8 @@ static noinline_for_stack int __extent_writepage_io(struct btrfs_inode *inode, ...@@ -3828,9 +3828,8 @@ static noinline_for_stack int __extent_writepage_io(struct btrfs_inode *inode,
int *nr_ret) int *nr_ret)
{ {
struct btrfs_fs_info *fs_info = inode->root->fs_info; struct btrfs_fs_info *fs_info = inode->root->fs_info;
u64 start = page_offset(page); u64 cur = page_offset(page);
u64 end = start + PAGE_SIZE - 1; u64 end = cur + PAGE_SIZE - 1;
u64 cur = start;
u64 extent_offset; u64 extent_offset;
u64 block_start; u64 block_start;
struct extent_map *em; struct extent_map *em;
...@@ -3840,7 +3839,7 @@ static noinline_for_stack int __extent_writepage_io(struct btrfs_inode *inode, ...@@ -3840,7 +3839,7 @@ static noinline_for_stack int __extent_writepage_io(struct btrfs_inode *inode,
const unsigned int write_flags = wbc_to_write_flags(wbc); const unsigned int write_flags = wbc_to_write_flags(wbc);
bool compressed; bool compressed;
ret = btrfs_writepage_cow_fixup(page, start, end); ret = btrfs_writepage_cow_fixup(page);
if (ret) { if (ret) {
/* Fixup worker will requeue */ /* Fixup worker will requeue */
redirty_page_for_writepage(wbc, page); redirty_page_for_writepage(wbc, page);
......
...@@ -2769,7 +2769,7 @@ static void btrfs_writepage_fixup_worker(struct btrfs_work *work) ...@@ -2769,7 +2769,7 @@ static void btrfs_writepage_fixup_worker(struct btrfs_work *work)
* to fix it up. The async helper will wait for ordered extents, set * to fix it up. The async helper will wait for ordered extents, set
* the delalloc bit and make it safe to write the page. * the delalloc bit and make it safe to write the page.
*/ */
int btrfs_writepage_cow_fixup(struct page *page, u64 start, u64 end) int btrfs_writepage_cow_fixup(struct page *page)
{ {
struct inode *inode = page->mapping->host; struct inode *inode = page->mapping->host;
struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb); struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
......
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