1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-29 14:50:24 +03:00

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 <gaofeng@cn.fujitsu.com>
This commit is contained in:
Gao feng 2012-06-11 11:37:36 +08:00 committed by Osier Yang
parent a80bb970fc
commit 0cb787bd3c

View 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);