aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/send.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/send.c')
-rw-r--r--fs/btrfs/send.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index c85e7c6b4598..e0c69a106c77 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -4529,9 +4529,11 @@ static int send_subvol(struct send_ctx *sctx)
4529{ 4529{
4530 int ret; 4530 int ret;
4531 4531
4532 ret = send_header(sctx); 4532 if (!(sctx->flags & BTRFS_SEND_FLAG_OMIT_STREAM_HEADER)) {
4533 if (ret < 0) 4533 ret = send_header(sctx);
4534 goto out; 4534 if (ret < 0)
4535 goto out;
4536 }
4535 4537
4536 ret = send_subvol_begin(sctx); 4538 ret = send_subvol_begin(sctx);
4537 if (ret < 0) 4539 if (ret < 0)
@@ -4593,7 +4595,7 @@ long btrfs_ioctl_send(struct file *mnt_file, void __user *arg_)
4593 goto out; 4595 goto out;
4594 } 4596 }
4595 4597
4596 if (arg->flags & ~BTRFS_SEND_FLAG_NO_FILE_DATA) { 4598 if (arg->flags & ~BTRFS_SEND_FLAG_MASK) {
4597 ret = -EINVAL; 4599 ret = -EINVAL;
4598 goto out; 4600 goto out;
4599 } 4601 }
@@ -4704,12 +4706,14 @@ long btrfs_ioctl_send(struct file *mnt_file, void __user *arg_)
4704 if (ret < 0) 4706 if (ret < 0)
4705 goto out; 4707 goto out;
4706 4708
4707 ret = begin_cmd(sctx, BTRFS_SEND_C_END); 4709 if (!(sctx->flags & BTRFS_SEND_FLAG_OMIT_END_CMD)) {
4708 if (ret < 0) 4710 ret = begin_cmd(sctx, BTRFS_SEND_C_END);
4709 goto out; 4711 if (ret < 0)
4710 ret = send_cmd(sctx); 4712 goto out;
4711 if (ret < 0) 4713 ret = send_cmd(sctx);
4712 goto out; 4714 if (ret < 0)
4715 goto out;
4716 }
4713 4717
4714out: 4718out:
4715 kfree(arg); 4719 kfree(arg);