static noinline_for_stack u64 find_lock_delalloc_range(struct inode *inode,
struct extent_io_tree *tree,
struct page *locked_page, u64 *start,
- u64 *end, u64 max_bytes)
+ u64 *end)
{
+ u64 max_bytes = BTRFS_MAX_EXTENT_SIZE;
u64 delalloc_start;
u64 delalloc_end;
u64 found;
u64 btrfs_find_lock_delalloc_range(struct inode *inode,
struct extent_io_tree *tree,
struct page *locked_page, u64 *start,
- u64 *end, u64 max_bytes)
+ u64 *end)
{
- return find_lock_delalloc_range(inode, tree, locked_page, start, end,
- max_bytes);
+ return find_lock_delalloc_range(inode, tree, locked_page, start, end);
}
#endif
nr_delalloc = find_lock_delalloc_range(inode, tree,
page,
&delalloc_start,
- &delalloc_end,
- BTRFS_MAX_EXTENT_SIZE);
+ &delalloc_end);
if (nr_delalloc == 0) {
delalloc_start = delalloc_end + 1;
continue;
u64 btrfs_find_lock_delalloc_range(struct inode *inode,
struct extent_io_tree *tree,
struct page *locked_page, u64 *start,
- u64 *end, u64 max_bytes);
+ u64 *end);
#endif
struct extent_buffer *alloc_test_extent_buffer(struct btrfs_fs_info *fs_info,
u64 start);
start = 0;
end = 0;
found = btrfs_find_lock_delalloc_range(inode, &tmp, locked_page, &start,
- &end, max_bytes);
+ &end);
if (!found) {
test_err("should have found at least one delalloc");
goto out_bits;
start = test_start;
end = 0;
found = btrfs_find_lock_delalloc_range(inode, &tmp, locked_page, &start,
- &end, max_bytes);
+ &end);
if (!found) {
test_err("couldn't find delalloc in our range");
goto out_bits;
start = test_start;
end = 0;
found = btrfs_find_lock_delalloc_range(inode, &tmp, locked_page, &start,
- &end, max_bytes);
+ &end);
if (found) {
test_err("found range when we shouldn't have");
goto out_bits;
start = test_start;
end = 0;
found = btrfs_find_lock_delalloc_range(inode, &tmp, locked_page, &start,
- &end, max_bytes);
+ &end);
if (!found) {
test_err("didn't find our range");
goto out_bits;
* tests expected behavior.
*/
found = btrfs_find_lock_delalloc_range(inode, &tmp, locked_page, &start,
- &end, max_bytes);
+ &end);
if (!found) {
test_err("didn't find our range");
goto out_bits;