mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-20 11:35:19 +00: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> (cherry picked from commit 0cb787bd3c337460706f8ea8c81f6bbfa0268b56)
This commit is contained in:
parent
95ae1a06bc
commit
a9846e98c7
@ -701,7 +701,7 @@ static int lxcContainerMountFSBind(virDomainFSDefPtr fs,
|
|||||||
|
|
||||||
if (fs->readonly) {
|
if (fs->readonly) {
|
||||||
VIR_DEBUG("Binding %s readonly", fs->dst);
|
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,
|
virReportSystemError(errno,
|
||||||
_("Failed to make directory %s readonly"),
|
_("Failed to make directory %s readonly"),
|
||||||
fs->dst);
|
fs->dst);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user