aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/btrfs/send.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index 4e2461b857f3..591063dac0e6 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -4776,35 +4776,6 @@ long btrfs_ioctl_send(struct file *mnt_file, void __user *arg_)
4776 WARN_ON(send_root->orphan_cleanup_state != ORPHAN_CLEANUP_DONE); 4776 WARN_ON(send_root->orphan_cleanup_state != ORPHAN_CLEANUP_DONE);
4777 4777
4778 /* 4778 /*
4779 * If we just created this root we need to make sure that the orphan
4780 * cleanup has been done and committed since we search the commit root,
4781 * so check its commit root transid with our otransid and if they match
4782 * commit the transaction to make sure everything is updated.
4783 */
4784 down_read(&send_root->fs_info->extent_commit_sem);
4785 if (btrfs_header_generation(send_root->commit_root) ==
4786 btrfs_root_otransid(&send_root->root_item)) {
4787 struct btrfs_trans_handle *trans;
4788
4789 up_read(&send_root->fs_info->extent_commit_sem);
4790
4791 trans = btrfs_attach_transaction_barrier(send_root);
4792 if (IS_ERR(trans)) {
4793 if (PTR_ERR(trans) != -ENOENT) {
4794 ret = PTR_ERR(trans);
4795 goto out;
4796 }
4797 /* ENOENT means theres no transaction */
4798 } else {
4799 ret = btrfs_commit_transaction(trans, send_root);
4800 if (ret)
4801 goto out;
4802 }
4803 } else {
4804 up_read(&send_root->fs_info->extent_commit_sem);
4805 }
4806
4807 /*
4808 * Userspace tools do the checks and warn the user if it's 4779 * Userspace tools do the checks and warn the user if it's
4809 * not RO. 4780 * not RO.
4810 */ 4781 */