[lxc-devel] [lxc/master] btrfs: fix btrfs containers

brauner on Github lxc-bot at linuxcontainers.org
Fri Sep 28 09:27:16 UTC 2018


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 441 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20180928/d821456b/attachment.bin>
-------------- next part --------------
From 2075d4d136a17e3748696d49a17c06ea586ee6b4 Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at ubuntu.com>
Date: Fri, 28 Sep 2018 11:24:46 +0200
Subject: [PATCH] btrfs: fix btrfs containers

Closes #2655.

Fixes: 9de31d5a1394 ("tree-wide: s/strncpy()/strlcpy()/g")
Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>
---
 src/lxc/storage/btrfs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lxc/storage/btrfs.c b/src/lxc/storage/btrfs.c
index af7f6eb1e..049074a45 100644
--- a/src/lxc/storage/btrfs.c
+++ b/src/lxc/storage/btrfs.c
@@ -366,6 +366,7 @@ int btrfs_snapshot(const char *orig, const char *new)
 		goto out;
 
 	memset(&args, 0, sizeof(args));
+	args.fd = fd;
 	retlen = strlcpy(args.name, newname, BTRFS_SUBVOL_NAME_MAX);
 	if (retlen >= BTRFS_SUBVOL_NAME_MAX)
 		goto out;


More information about the lxc-devel mailing list