Re: [PATCH] LXC: fix incorrect parameter of mount in lxcContainerMountFSBind

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2012年06月11日 11:37, Gao feng wrote:
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@xxxxxxxxxxxxxx>
---
  src/lxc/lxc_container.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
index 506eb43..cd15ca4 100644
--- a/src/lxc/lxc_container.c
+++ b/src/lxc/lxc_container.c
@@ -744,7 +744,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);

ACK, and pushed.

Osier

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]