@@ -445,9 +445,7 @@ func (ctrl *MountController) handleMemoryMountOperation(
445445
446446 logger = logger .With (zap .String ("mount_request.id" , mountRequest .Metadata ().ID ()))
447447
448- // mount hasn't been done yet
449448 if ! ok {
450- // Extract size from mount parameters
451449 var sizeOpt string
452450
453451 for _ , param := range volumeStatus .TypedSpec ().MountSpec .Parameters {
@@ -477,7 +475,6 @@ func (ctrl *MountController) handleMemoryMountOperation(
477475 return fmt .Errorf ("failed to mount tmpfs at %s: %w" , mountTarget , err )
478476 }
479477
480- // Apply SELinux label if specified
481478 if volumeStatus .TypedSpec ().MountSpec .SelinuxLabel != "" {
482479 if err := selinux .SetLabel (mountTarget , volumeStatus .TypedSpec ().MountSpec .SelinuxLabel ); err != nil {
483480 unix .Unmount (mountTarget , 0 ) //nolint:errcheck
@@ -486,7 +483,6 @@ func (ctrl *MountController) handleMemoryMountOperation(
486483 }
487484 }
488485
489- // Update ownership and permissions if specified
490486 if ! mountRequest .TypedSpec ().ReadOnly && ! mountRequest .TypedSpec ().Detached {
491487 if err := ctrl .updateTargetSettings (mountTarget , volumeStatus .TypedSpec ().MountSpec ); err != nil {
492488 unix .Unmount (mountTarget , 0 ) //nolint:errcheck
@@ -500,7 +496,6 @@ func (ctrl *MountController) handleMemoryMountOperation(
500496 zap .String ("target" , mountTarget ),
501497 )
502498
503- // Store the mount context
504499 ctrl .activeMounts [mountRequest .Metadata ().ID ()] = & mountContext {
505500 point : nil , // No mount.Point for direct unix.Mount
506501 readOnly : mountRequest .TypedSpec ().ReadOnly ,
0 commit comments