summaryrefslogtreecommitdiff
path: root/fs/btrfs/send.c
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-12-16 14:55:49 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-12-16 14:55:49 -0300
commitf3a16ba6a1152b8966dcadc668af4cf00623c7b1 (patch)
tree5fee49a027f6fddf70b29369d24703946370eb77 /fs/btrfs/send.c
parentb652965369918b9d992dc42fb060240f94d98769 (diff)
Linux-libre 4.3.3-gnu
Diffstat (limited to 'fs/btrfs/send.c')
-rw-r--r--fs/btrfs/send.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index a739b825b..23bb2e4b9 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -2353,8 +2353,14 @@ static int send_subvol_begin(struct send_ctx *sctx)
}
TLV_PUT_STRING(sctx, BTRFS_SEND_A_PATH, name, namelen);
- TLV_PUT_UUID(sctx, BTRFS_SEND_A_UUID,
- sctx->send_root->root_item.uuid);
+
+ if (!btrfs_is_empty_uuid(sctx->send_root->root_item.received_uuid))
+ TLV_PUT_UUID(sctx, BTRFS_SEND_A_UUID,
+ sctx->send_root->root_item.received_uuid);
+ else
+ TLV_PUT_UUID(sctx, BTRFS_SEND_A_UUID,
+ sctx->send_root->root_item.uuid);
+
TLV_PUT_U64(sctx, BTRFS_SEND_A_CTRANSID,
le64_to_cpu(sctx->send_root->root_item.ctransid));
if (parent_root) {