aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ordered-data.c
diff options
context:
space:
mode:
authorDavid Sterba <[email protected]>2020-02-05 18:09:30 +0000
committerDavid Sterba <[email protected]>2020-03-23 16:01:34 +0000
commitae6957ebbfcd418348550ac02e36b0ea86d32e0a (patch)
treef3fa1b9f0dd1b1580f3426fb293c2b985b40ff5d /fs/btrfs/ordered-data.c
parentbtrfs: drop argument tree from submit_extent_page (diff)
downloadkernel-ae6957ebbfcd418348550ac02e36b0ea86d32e0a.tar.gz
kernel-ae6957ebbfcd418348550ac02e36b0ea86d32e0a.zip
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 <[email protected]> Reviewed-by: Nikolay Borisov <[email protected]> Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'fs/btrfs/ordered-data.c')
-rw-r--r--fs/btrfs/ordered-data.c2
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;