Merge branch 'for-4.2/core' of git://git.kernel.dk/linux-block
[firefly-linux-kernel-4.4.55.git] / fs / btrfs / volumes.c
index dac77d42a9ab431ee6bbf8aa4a5bb910ef0ecc9d..53af23f2c087ad015e720af094fbfc53e1671317 100644 (file)
@@ -4625,6 +4625,7 @@ int btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
 {
        u64 chunk_offset;
 
+       ASSERT(mutex_is_locked(&extent_root->fs_info->chunk_mutex));
        chunk_offset = find_next_chunk(extent_root->fs_info);
        return __btrfs_alloc_chunk(trans, extent_root, chunk_offset, type);
 }