Sfoglia il codice sorgente

Merge pull request #40670 from thaJeztah/fix_linting

fix linting in pkg/mount
Sebastiaan van Stijn 5 anni fa
parent
commit
5d86e4a840
1 ha cambiato i file con 2 aggiunte e 3 eliminazioni
  1. 2 3
      pkg/mount/mount.go

+ 2 - 3
pkg/mount/mount.go

@@ -140,10 +140,9 @@ func RecursiveUnmount(target string) error {
 		if err != nil {
 		if err != nil {
 			if i == len(mounts)-1 { // last mount
 			if i == len(mounts)-1 { // last mount
 				return err
 				return err
-			} else {
-				// This is some submount, we can ignore this error for now, the final unmount will fail if this is a real problem
-				logrus.WithError(err).Warnf("Failed to unmount submount %s", m.Mountpoint)
 			}
 			}
+			// This is some submount, we can ignore this error for now, the final unmount will fail if this is a real problem
+			logrus.WithError(err).Warnf("Failed to unmount submount %s", m.Mountpoint)
 		}
 		}
 
 
 		logrus.Debugf("Unmounted %s", m.Mountpoint)
 		logrus.Debugf("Unmounted %s", m.Mountpoint)