Skip to content

Commit

Permalink
pkg/mount: fix dropped error
Browse files Browse the repository at this point in the history
Signed-off-by: Lars Lehtonen <[email protected]>
  • Loading branch information
alrs committed Dec 20, 2023
1 parent 16f3ba1 commit 8657a13
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/mount/mount.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ import (
"syscall"
"time"

"github.com/moby/sys/mountinfo"
"github.com/libopenstorage/openstorage/pkg/chattr"
"github.com/libopenstorage/openstorage/pkg/keylock"
"github.com/libopenstorage/openstorage/pkg/options"
"github.com/libopenstorage/openstorage/pkg/sched"
"github.com/libopenstorage/openstorage/volume"
"github.com/moby/sys/mountinfo"
"github.com/pborman/uuid"
"github.com/sirupsen/logrus"
)
Expand Down Expand Up @@ -669,6 +669,10 @@ func (m *Mounter) removeMountPath(path string) error {
}
if devicePath, mounted := bindMounter.HasTarget(path); mounted {
bindMountPath, err = bindMounter.GetRootPath(path)
if err != nil {
logrus.Warnf("Failed to get root path for %q. Err: %v", path, err)
return err
}
if err := m.mountImpl.Unmount(path, 0, 0); err != nil {
return fmt.Errorf("failed to unmount bind mount %v. Err: %v", devicePath, err)
}
Expand Down

0 comments on commit 8657a13

Please sign in to comment.