diff options
author | Nikolay Borisov <nborisov@suse.com> | 2020-06-03 08:55:06 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-07-27 12:55:26 +0200 |
commit | ad7ff17b65a0567b826c88009d3ea080431816c3 (patch) | |
tree | 78e36082a5607f1540cb4b147c987c2150a08dd1 /fs/btrfs/inode.c | |
parent | 4b67c11dd19cd6443944d888b027017bb7872514 (diff) |
btrfs: make extent_clear_unlock_delalloc take btrfs_inode
It has one VFS and 1 btrfs inode usages but converting it to btrfs_inode
interface will allow seamless conversion of its callers.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 7015bf1a65c0..cab56c37ec39 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -642,7 +642,8 @@ cont: * our outstanding extent for clearing delalloc for this * range. */ - extent_clear_unlock_delalloc(inode, start, end, NULL, + extent_clear_unlock_delalloc(BTRFS_I(inode), start, end, + NULL, clear_flags, PAGE_UNLOCK | PAGE_CLEAR_DIRTY | @@ -878,7 +879,7 @@ retry: /* * clear dirty, set writeback and unlock the pages. */ - extent_clear_unlock_delalloc(inode, async_extent->start, + extent_clear_unlock_delalloc(BTRFS_I(inode), async_extent->start, async_extent->start + async_extent->ram_size - 1, NULL, EXTENT_LOCKED | EXTENT_DELALLOC, @@ -900,7 +901,7 @@ retry: btrfs_writepage_endio_finish_ordered(p, start, end, 0); p->mapping = NULL; - extent_clear_unlock_delalloc(inode, start, end, + extent_clear_unlock_delalloc(BTRFS_I(inode), start, end, NULL, 0, PAGE_END_WRITEBACK | PAGE_SET_ERROR); @@ -915,7 +916,7 @@ out_free_reserve: btrfs_dec_block_group_reservations(fs_info, ins.objectid); btrfs_free_reserved_extent(fs_info, ins.objectid, ins.offset, 1); out_free: - extent_clear_unlock_delalloc(inode, async_extent->start, + extent_clear_unlock_delalloc(BTRFS_I(inode), async_extent->start, async_extent->start + async_extent->ram_size - 1, NULL, EXTENT_LOCKED | EXTENT_DELALLOC | @@ -1017,7 +1018,8 @@ static noinline int cow_file_range(struct inode *inode, * our outstanding extent for clearing delalloc for this * range. */ - extent_clear_unlock_delalloc(inode, start, end, NULL, + extent_clear_unlock_delalloc(BTRFS_I(inode), start, end, + NULL, EXTENT_LOCKED | EXTENT_DELALLOC | EXTENT_DELALLOC_NEW | EXTENT_DEFRAG | EXTENT_DO_ACCOUNTING, PAGE_UNLOCK | @@ -1115,7 +1117,7 @@ static noinline int cow_file_range(struct inode *inode, page_ops = unlock ? PAGE_UNLOCK : 0; page_ops |= PAGE_SET_PRIVATE2; - extent_clear_unlock_delalloc(inode, start, + extent_clear_unlock_delalloc(BTRFS_I(inode), start, start + ram_size - 1, locked_page, EXTENT_LOCKED | EXTENT_DELALLOC, @@ -1160,7 +1162,7 @@ out_unlock: * it the flag EXTENT_CLEAR_DATA_RESV. */ if (extent_reserved) { - extent_clear_unlock_delalloc(inode, start, + extent_clear_unlock_delalloc(BTRFS_I(inode), start, start + cur_alloc_size - 1, locked_page, clear_bits, @@ -1169,7 +1171,7 @@ out_unlock: if (start >= end) goto out; } - extent_clear_unlock_delalloc(inode, start, end, locked_page, + extent_clear_unlock_delalloc(BTRFS_I(inode), start, end, locked_page, clear_bits | EXTENT_CLEAR_DATA_RESV, page_ops); goto out; @@ -1277,8 +1279,8 @@ static int cow_file_range_async(struct inode *inode, PAGE_SET_WRITEBACK | PAGE_END_WRITEBACK | PAGE_SET_ERROR; - extent_clear_unlock_delalloc(inode, start, end, locked_page, - clear_bits, page_ops); + extent_clear_unlock_delalloc(BTRFS_I(inode), start, end, + locked_page, clear_bits, page_ops); return -ENOMEM; } @@ -1468,7 +1470,8 @@ static noinline int run_delalloc_nocow(struct inode *inode, path = btrfs_alloc_path(); if (!path) { - extent_clear_unlock_delalloc(inode, start, end, locked_page, + extent_clear_unlock_delalloc(BTRFS_I(inode), start, end, + locked_page, EXTENT_LOCKED | EXTENT_DELALLOC | EXTENT_DO_ACCOUNTING | EXTENT_DEFRAG, PAGE_UNLOCK | @@ -1746,7 +1749,7 @@ out_check: ret = btrfs_reloc_clone_csums(BTRFS_I(inode), cur_offset, num_bytes); - extent_clear_unlock_delalloc(inode, cur_offset, + extent_clear_unlock_delalloc(BTRFS_I(inode), cur_offset, cur_offset + num_bytes - 1, locked_page, EXTENT_LOCKED | EXTENT_DELALLOC | @@ -1783,7 +1786,7 @@ error: btrfs_dec_nocow_writers(fs_info, disk_bytenr); if (ret && cur_offset < end) - extent_clear_unlock_delalloc(inode, cur_offset, end, + extent_clear_unlock_delalloc(BTRFS_I(inode), cur_offset, end, locked_page, EXTENT_LOCKED | EXTENT_DELALLOC | EXTENT_DEFRAG | EXTENT_DO_ACCOUNTING, PAGE_UNLOCK | |