Commit 3347c48f authored by Nikolay Borisov's avatar Nikolay Borisov Committed by David Sterba

btrfs: make btrfs_writepage_endio_finish_ordered btrfs_inode-centric

Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: default avatarJosef Bacik <josef@toxicpanda.com>
Signed-off-by: default avatarNikolay Borisov <nborisov@suse.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 53ac7ead
...@@ -2773,19 +2773,19 @@ static void finish_ordered_fn(struct btrfs_work *work) ...@@ -2773,19 +2773,19 @@ static void finish_ordered_fn(struct btrfs_work *work)
void btrfs_writepage_endio_finish_ordered(struct page *page, u64 start, void btrfs_writepage_endio_finish_ordered(struct page *page, u64 start,
u64 end, int uptodate) u64 end, int uptodate)
{ {
struct inode *inode = page->mapping->host; struct btrfs_inode *inode = BTRFS_I(page->mapping->host);
struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb); struct btrfs_fs_info *fs_info = inode->root->fs_info;
struct btrfs_ordered_extent *ordered_extent = NULL; struct btrfs_ordered_extent *ordered_extent = NULL;
struct btrfs_workqueue *wq; struct btrfs_workqueue *wq;
trace_btrfs_writepage_end_io_hook(page, start, end, uptodate); trace_btrfs_writepage_end_io_hook(page, start, end, uptodate);
ClearPagePrivate2(page); ClearPagePrivate2(page);
if (!btrfs_dec_test_ordered_pending(BTRFS_I(inode), &ordered_extent, if (!btrfs_dec_test_ordered_pending(inode, &ordered_extent, start,
start, end - start + 1, uptodate)) end - start + 1, uptodate))
return; return;
if (btrfs_is_free_space_inode(BTRFS_I(inode))) if (btrfs_is_free_space_inode(inode))
wq = fs_info->endio_freespace_worker; wq = fs_info->endio_freespace_worker;
else else
wq = fs_info->endio_write_workers; wq = fs_info->endio_write_workers;
......
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