[lxc-devel] [PATCH 22/24] Don't call setup_mount_entries if the list is empty

Serge Hallyn serge.hallyn at canonical.com
Tue Jan 8 18:37:14 UTC 2013


Quoting Stéphane Graber (stgraber at ubuntu.com):
> There's no good reason to call setup_mount_entries if we don't have any
> lxc.mount.entry. This also avoids an issue on bionic where the tmpfile()
> call in setup_mount_entries requires the presence of /tmp which isn't the
> case by default.
> 
> Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>

(There are other ways it could be done I suppose, but this is fine)

Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>

> ---
>  src/lxc/conf.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/lxc/conf.c b/src/lxc/conf.c
> index 3c44ea5..945c3b8 100644
> --- a/src/lxc/conf.c
> +++ b/src/lxc/conf.c
> @@ -2599,7 +2599,7 @@ int lxc_setup(const char *name, struct lxc_conf *lxc_conf)
>  		return -1;
>  	}
>  
> -	if (setup_mount_entries(&lxc_conf->rootfs, &lxc_conf->mount_list, name)) {
> +	if (!lxc_list_empty(&lxc_conf->mount_list) && setup_mount_entries(&lxc_conf->rootfs, &lxc_conf->mount_list, name)) {
>  		ERROR("failed to setup the mount entries for '%s'", name);
>  		return -1;
>  	}
> -- 
> 1.8.0
> 
> 
> ------------------------------------------------------------------------------
> Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
> and more. Get SQL Server skills now (including 2012) with LearnDevNow -
> 200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
> SALE $99.99 this month only - learn more at:
> http://p.sf.net/sfu/learnmore_122512
> _______________________________________________
> Lxc-devel mailing list
> Lxc-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-devel




More information about the lxc-devel mailing list