diff options
author | Nikolay Borisov <nborisov@suse.com> | 2018-04-27 12:21:52 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-05-28 18:07:32 +0200 |
commit | 7c8a0d363aca1447a0e82e31c54d220e3ecd6a87 (patch) | |
tree | 21828cee2a8bb24b703b3b22676afe174a3aae5a | |
parent | 0f96f517dcaa58346c32be094aecd610b7d3c008 (diff) |
btrfs: Add assert in __btrfs_del_delalloc_inode
The invariant is that when nr_delalloc_inodes is 0 then the root
mustn't have any inodes on its delalloc inodes list.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | fs/btrfs/inode.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 29374d31f1de..a7529827d89c 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -1754,6 +1754,7 @@ void __btrfs_del_delalloc_inode(struct btrfs_root *root, &inode->runtime_flags); root->nr_delalloc_inodes--; if (!root->nr_delalloc_inodes) { + ASSERT(list_empty(&root->delalloc_inodes)); spin_lock(&fs_info->delalloc_root_lock); BUG_ON(list_empty(&root->delalloc_root)); list_del_init(&root->delalloc_root); |