]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - fs/btrfs/extent-tree.c
Btrfs: remove lock assert from get_restripe_target()
[mirror_ubuntu-artful-kernel.git] / fs / btrfs / extent-tree.c
index ace5e8cef03ee9e968bff163492bcc9d518dfce4..a2134d8141c13d83ac6d53e26357b47fe71a963a 100644 (file)
@@ -3152,15 +3152,14 @@ static void set_avail_alloc_bits(struct btrfs_fs_info *fs_info, u64 flags)
 /*
  * returns target flags in extended format or 0 if restripe for this
  * chunk_type is not in progress
+ *
+ * should be called with either volume_mutex or balance_lock held
  */
 static u64 get_restripe_target(struct btrfs_fs_info *fs_info, u64 flags)
 {
        struct btrfs_balance_control *bctl = fs_info->balance_ctl;
        u64 target = 0;
 
-       BUG_ON(!mutex_is_locked(&fs_info->volume_mutex) &&
-              !spin_is_locked(&fs_info->balance_lock));
-
        if (!bctl)
                return 0;