aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/delayed-ref.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/delayed-ref.c')
-rw-r--r--fs/btrfs/delayed-ref.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-ref.c
index ee181989d444..66e4f29505a3 100644
--- a/fs/btrfs/delayed-ref.c
+++ b/fs/btrfs/delayed-ref.c
@@ -664,6 +664,9 @@ int btrfs_add_delayed_tree_ref(struct btrfs_fs_info *fs_info,
664 num_bytes, parent, ref_root, level, action, 664 num_bytes, parent, ref_root, level, action,
665 for_cow); 665 for_cow);
666 BUG_ON(ret); 666 BUG_ON(ret);
667 if (!need_ref_seq(for_cow, ref_root) &&
668 waitqueue_active(&delayed_refs->seq_wait))
669 wake_up(&delayed_refs->seq_wait);
667 spin_unlock(&delayed_refs->lock); 670 spin_unlock(&delayed_refs->lock);
668 return 0; 671 return 0;
669} 672}
@@ -712,6 +715,9 @@ int btrfs_add_delayed_data_ref(struct btrfs_fs_info *fs_info,
712 num_bytes, parent, ref_root, owner, offset, 715 num_bytes, parent, ref_root, owner, offset,
713 action, for_cow); 716 action, for_cow);
714 BUG_ON(ret); 717 BUG_ON(ret);
718 if (!need_ref_seq(for_cow, ref_root) &&
719 waitqueue_active(&delayed_refs->seq_wait))
720 wake_up(&delayed_refs->seq_wait);
715 spin_unlock(&delayed_refs->lock); 721 spin_unlock(&delayed_refs->lock);
716 return 0; 722 return 0;
717} 723}
@@ -739,6 +745,8 @@ int btrfs_add_delayed_extent_op(struct btrfs_fs_info *fs_info,
739 extent_op->is_data); 745 extent_op->is_data);
740 BUG_ON(ret); 746 BUG_ON(ret);
741 747
748 if (waitqueue_active(&delayed_refs->seq_wait))
749 wake_up(&delayed_refs->seq_wait);
742 spin_unlock(&delayed_refs->lock); 750 spin_unlock(&delayed_refs->lock);
743 return 0; 751 return 0;
744} 752}