]> xenbits.xensource.com Git - libvirt.git/commitdiff
LXC: fix incorrect parameter of mount in lxcContainerMountFSBind
authorGao feng <gaofeng@cn.fujitsu.com>
Mon, 11 Jun 2012 03:37:36 +0000 (11:37 +0800)
committerOsier Yang <jyang@redhat.com>
Mon, 11 Jun 2012 05:03:48 +0000 (13:03 +0800)
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 <gaofeng@cn.fujitsu.com>
src/lxc/lxc_container.c

index e024fc59671f5541b0afd0aef78db5e3cd1349a4..40ab93630a4f09e41d63cc7b1c6ffa9c8c373b54 100644 (file)
@@ -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);