summaryrefslogtreecommitdiff
path: root/src/shared/machine-image.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-04-29 19:26:54 +0200
committerLennart Poettering <lennart@poettering.net>2016-05-02 11:15:30 +0200
commit8120ee28b8d5d316d9ded9240bcccc9edb41ee06 (patch)
tree8116608d4d7fd5c902d4f34f8da2d3af6e4e5ea1 /src/shared/machine-image.c
parent89c9030d319e118fa324fa5a1302ba53180b05b6 (diff)
image: enable btrfs quotas on the clone destination, not the source
Diffstat (limited to 'src/shared/machine-image.c')
-rw-r--r--src/shared/machine-image.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shared/machine-image.c b/src/shared/machine-image.c
index bebfc40efe..042ccc071c 100644
--- a/src/shared/machine-image.c
+++ b/src/shared/machine-image.c
@@ -607,9 +607,9 @@ int image_clone(Image *i, const char *new_name, bool read_only) {
r = btrfs_subvol_snapshot(i->path, new_path, (read_only ? BTRFS_SNAPSHOT_READ_ONLY : 0) | BTRFS_SNAPSHOT_FALLBACK_COPY | BTRFS_SNAPSHOT_RECURSIVE | BTRFS_SNAPSHOT_QUOTA);
- /* Enable "subtree" quotas for the copy, if we didn't
- * copy any quota from the source. */
- (void) btrfs_subvol_auto_qgroup(i->path, 0, true);
+ /* Enable "subtree" quotas for the copy, if we didn't copy any quota from the source. */
+ if (r >= 0)
+ (void) btrfs_subvol_auto_qgroup(new_path, 0, true);
break;