btrfs: add assertions for tree == inode->io_tree to extent IO helpers
Add assertions to all helpers that get tree as argument and verify that it's the same that can be obtained from the inode or from its pages. In followup patches the redundant arguments and assertions will be removed one by one. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
@@ -854,6 +854,8 @@ void btrfs_lock_and_flush_ordered_range(struct extent_io_tree *tree,
|
||||
struct extent_state *cache = NULL;
|
||||
struct extent_state **cachedp = &cache;
|
||||
|
||||
ASSERT(tree == &inode->io_tree);
|
||||
|
||||
if (cached_state)
|
||||
cachedp = cached_state;
|
||||
|
||||
|
Reference in New Issue
Block a user