[libvirt] [PATCH]lxc: do cleanup when failed to bind fs as read-only

Chen Hanxiao chenhanxiao at cn.fujitsu.com
Mon Sep 30 08:56:41 UTC 2013



> -----Original Message-----
> From: Daniel P. Berrange [mailto:berrange at redhat.com]
> Sent: Monday, September 30, 2013 4:45 PM
> To: Chen Hanxiao
> Cc: libvir-list at redhat.com
> Subject: Re: [libvirt] [PATCH]lxc: do cleanup when failed to bind fs as read-only
> 
> On Sun, Sep 29, 2013 at 06:36:24PM +0800, Chen Hanxiao wrote:
> > From: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
> >
> > We forgot to 'goto cleanup' when lxcContainerMountFSTmpfs
> > failed to bind fs as read-only.
> >
> > Signed-off-by: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
> > ---
> >  src/lxc/lxc_container.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
> > index c60f5d8..3fdf397 100644
> > --- a/src/lxc/lxc_container.c
> > +++ b/src/lxc/lxc_container.c
> > @@ -1451,6 +1451,7 @@ static int
> lxcContainerMountFSTmpfs(virDomainFSDefPtr fs,
> >              virReportSystemError(errno,
> >                                   _("Failed to make directory %s
> readonly"),
> >                                   fs->dst);
> > +        goto cleanup;
> 
> Indentation is not right here

Oops...
v2 will come soon
> 
> Regards,
> Daniel
> --
> |: http://berrange.com      -o-
> http://www.flickr.com/photos/dberrange/ :|
> |: http://libvirt.org              -o-
> http://virt-manager.org :|
> |: http://autobuild.org       -o-
> http://search.cpan.org/~danberr/ :|
> |: http://entangle-photo.org       -o-
> http://live.gnome.org/gtk-vnc :|






More information about the libvir-list mailing list