btrfs: tests: add separate stub for find_lock_delalloc_range
The helper find_lock_delalloc_range is now conditionally built static, dpending on whether the self-tests are enabled or not. There's a macro that is supposed to hide the export, used only once. To discourage further use, drop it an add a public wrapper for the helper needed by tests. Reviewed-by: Omar Sandoval <osandov@fb.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
@@ -1563,7 +1563,7 @@ static noinline int lock_delalloc_pages(struct inode *inode,
|
||||
*
|
||||
* 1 is returned if we find something, 0 if nothing was in the tree
|
||||
*/
|
||||
STATIC u64 find_lock_delalloc_range(struct inode *inode,
|
||||
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)
|
||||
@@ -1643,6 +1643,17 @@ out_failed:
|
||||
return found;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
|
||||
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)
|
||||
{
|
||||
return find_lock_delalloc_range(inode, tree, locked_page, start, end,
|
||||
max_bytes);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int __process_pages_contig(struct address_space *mapping,
|
||||
struct page *locked_page,
|
||||
pgoff_t start_index, pgoff_t end_index,
|
||||
|
Reference in New Issue
Block a user