diff options
author | David Sterba <dsterba@suse.com> | 2020-02-05 21:09:30 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-03-23 19:01:34 +0300 |
commit | ae6957ebbfcd418348550ac02e36b0ea86d32e0a (patch) | |
tree | f3fa1b9f0dd1b1580f3426fb293c2b985b40ff5d /fs/btrfs/ordered-data.c | |
parent | 0ceb34bf46d1a849b4d0659f8913bfcb14e5d482 (diff) | |
download | linux-ae6957ebbfcd418348550ac02e36b0ea86d32e0a.tar.xz |
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>
Diffstat (limited to 'fs/btrfs/ordered-data.c')
-rw-r--r-- | fs/btrfs/ordered-data.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/ordered-data.c b/fs/btrfs/ordered-data.c index 632981848649..f47accad6f05 100644 --- a/fs/btrfs/ordered-data.c +++ b/fs/btrfs/ordered-data.c @@ -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; |