From: Gao feng Date: Mon, 11 Jun 2012 03:37:36 +0000 (+0800) Subject: LXC: fix incorrect parameter of mount in lxcContainerMountFSBind X-Git-Tag: v0.9.13-rc1~122 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0cb787bd3c337460706f8ea8c81f6bbfa0268b56;p=thirdparty%2Flibvirt.git 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 --- 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);