Remove unnecessary check for mount label for /dev/shm
Signed-off-by: Mrunal Patel <mpatel@redhat.com>
This commit is contained in:
parent
4cc510c046
commit
a0177ced09
1 changed files with 2 additions and 5 deletions
|
@ -338,11 +338,8 @@ func setupShm(podSandboxDir, mountLabel string) (shmPath string, err error) {
|
|||
return "", err
|
||||
}
|
||||
shmOptions := "mode=1777,size=" + strconv.Itoa(defaultShmSize)
|
||||
if mountLabel != "" {
|
||||
shmOptions = label.FormatMountLabel(shmOptions, mountLabel)
|
||||
|
||||
}
|
||||
if err = syscall.Mount("shm", shmPath, "tmpfs", uintptr(syscall.MS_NOEXEC|syscall.MS_NOSUID|syscall.MS_NODEV), shmOptions); err != nil {
|
||||
if err = syscall.Mount("shm", shmPath, "tmpfs", uintptr(syscall.MS_NOEXEC|syscall.MS_NOSUID|syscall.MS_NODEV),
|
||||
label.FormatMountLabel(shmOptions, mountLabel)); err != nil {
|
||||
return "", fmt.Errorf("failed to mount shm tmpfs for pod: %v", err)
|
||||
}
|
||||
return shmPath, nil
|
||||
|
|
Loading…
Reference in a new issue