diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 2db3fe12f50d5d49d62132f306079847b358ac7c..ebac486f59af85c7f164f648284f3c0762dd2e66 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -2424,6 +2424,7 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file, shrink_dcache_sb(root->fs_info->sb); btrfs_invalidate_inodes(dest); d_delete(dentry); + ASSERT(dest->send_in_progress == 0); /* the last ref */ if (dest->cache_inode) { diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 7579f6d0b8549525e6460f36af8666e1ca980a23..c30815e79235292609f8e7bc52b0994501314871 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -1984,19 +1984,6 @@ int btrfs_clean_one_deleted_snapshot(struct btrfs_root *root) } root = list_first_entry(&fs_info->dead_roots, struct btrfs_root, root_list); - /* - * Make sure root is not involved in send, - * if we fail with first root, we return - * directly rather than continue. - */ - spin_lock(&root->root_item_lock); - if (root->send_in_progress) { - spin_unlock(&fs_info->trans_lock); - spin_unlock(&root->root_item_lock); - return 0; - } - spin_unlock(&root->root_item_lock); - list_del_init(&root->root_list); spin_unlock(&fs_info->trans_lock);