From 55aabc142c005cd732614e1af985902814a1f704 Mon Sep 17 00:00:00 2001 From: Thomas Tanaka Date: Thu, 24 Mar 2016 13:14:57 -0700 Subject: [PATCH] Only perform mount labelling when necessary Do label mqueue when mounting it with label failed/not supported. Signed-off-by: Thomas Tanaka --- libcontainer/rootfs_linux.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libcontainer/rootfs_linux.go b/libcontainer/rootfs_linux.go index 1a880fe9e..7acfc1f04 100644 --- a/libcontainer/rootfs_linux.go +++ b/libcontainer/rootfs_linux.go @@ -140,8 +140,9 @@ func mountToRootfs(m *configs.Mount, rootfs, mountLabel string) error { if err := mountPropagate(m, rootfs, ""); err != nil { return err } + return label.SetFileLabel(dest, mountLabel) } - return label.SetFileLabel(dest, mountLabel) + return nil case "tmpfs": stat, err := os.Stat(dest) if err != nil {