From a9846e98c7b2968a6a87dcf002a2ad58d1766c2a 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 (cherry picked from commit 0cb787bd3c337460706f8ea8c81f6bbfa0268b56) --- 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 0636eabce4..f488000f5c 100644 --- a/src/lxc/lxc_container.c +++ b/src/lxc/lxc_container.c @@ -701,7 +701,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);