mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-27 06:04:23 +08:00
btrfs: assert extent map tree lock in add_extent_mapping
As add_extent_mapping is called from several functions, let's add the lock annotation. The tree is going to be modified so it must be the exclusive lock. Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
982f1f5d16
commit
d23ea3fa7d
@ -384,6 +384,8 @@ int add_extent_mapping(struct extent_map_tree *tree,
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
lockdep_assert_held_write(&tree->lock);
|
||||
|
||||
ret = tree_insert(&tree->map, em);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
Loading…
Reference in New Issue
Block a user