From 0cb787bd3c337460706f8ea8c81f6bbfa0268b56 Mon Sep 17 00:00:00 2001 From: Gao feng Date: Mon, 11 Jun 2012 11:37:36 +0800 Subject: [PATCH] LXC: fix incorrect parameter of mount in lxcContainerMountFSBind when do remount,the source and target should be the same values specified in the initial mount() call. So change fs->dst to src. Signed-off-by: Gao feng --- src/lxc/lxc_container.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c index e024fc5967..40ab93630a 100644 --- a/src/lxc/lxc_container.c +++ b/src/lxc/lxc_container.c @@ -670,7 +670,7 @@ static int lxcContainerMountFSBind(virDomainFSDefPtr fs, if (fs->readonly) { VIR_DEBUG("Binding %s readonly", fs->dst); - if (mount(fs->dst, fs->dst, NULL, MS_BIND|MS_REMOUNT|MS_RDONLY, NULL) < 0) { + if (mount(src, fs->dst, NULL, MS_BIND|MS_REMOUNT|MS_RDONLY, NULL) < 0) { virReportSystemError(errno, _("Failed to make directory %s readonly"), fs->dst); -- 2.47.2