Commit e7fbf604 authored by Nikolay Borisov's avatar Nikolay Borisov Committed by David Sterba

btrfs: make btrfs_add_ordered_extent take btrfs_inode

Preparation to converting its callers to taking btrfs_inode.
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 a0349401
......@@ -1081,8 +1081,9 @@ static noinline int cow_file_range(struct inode *inode,
}
free_extent_map(em);
ret = btrfs_add_ordered_extent(inode, start, ins.objectid,
ram_size, cur_alloc_size, 0);
ret = btrfs_add_ordered_extent(BTRFS_I(inode), start,
ins.objectid, ram_size,
cur_alloc_size, 0);
if (ret)
goto out_drop_extent_cache;
......@@ -1716,7 +1717,7 @@ static noinline int run_delalloc_nocow(struct inode *inode,
goto error;
}
free_extent_map(em);
ret = btrfs_add_ordered_extent(inode, cur_offset,
ret = btrfs_add_ordered_extent(BTRFS_I(inode), cur_offset,
disk_bytenr, num_bytes,
num_bytes,
BTRFS_ORDERED_PREALLOC);
......@@ -1728,7 +1729,7 @@ static noinline int run_delalloc_nocow(struct inode *inode,
goto error;
}
} else {
ret = btrfs_add_ordered_extent(inode, cur_offset,
ret = btrfs_add_ordered_extent(BTRFS_I(inode), cur_offset,
disk_bytenr, num_bytes,
num_bytes,
BTRFS_ORDERED_NOCOW);
......
......@@ -252,11 +252,11 @@ static int __btrfs_add_ordered_extent(struct btrfs_inode *inode, u64 file_offset
return 0;
}
int btrfs_add_ordered_extent(struct inode *inode, u64 file_offset,
int btrfs_add_ordered_extent(struct btrfs_inode *inode, u64 file_offset,
u64 disk_bytenr, u64 num_bytes, u64 disk_num_bytes,
int type)
{
return __btrfs_add_ordered_extent(BTRFS_I(inode), file_offset, disk_bytenr,
return __btrfs_add_ordered_extent(inode, file_offset, disk_bytenr,
num_bytes, disk_num_bytes, type, 0,
BTRFS_COMPRESS_NONE);
}
......
......@@ -151,7 +151,7 @@ int btrfs_dec_test_first_ordered_pending(struct inode *inode,
struct btrfs_ordered_extent **cached,
u64 *file_offset, u64 io_size,
int uptodate);
int btrfs_add_ordered_extent(struct inode *inode, u64 file_offset,
int btrfs_add_ordered_extent(struct btrfs_inode *inode, u64 file_offset,
u64 disk_bytenr, u64 num_bytes, u64 disk_num_bytes,
int type);
int btrfs_add_ordered_extent_dio(struct inode *inode, u64 file_offset,
......
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