From 75e77802ca9a25c89fef1c7a12a825beb0d013ac Mon Sep 17 00:00:00 2001 From: Akshay Saini Date: Mon, 28 Oct 2024 14:53:42 +0530 Subject: [PATCH] Fix private target unmount issue in NodeUnpublishVolume --- service/mount.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/service/mount.go b/service/mount.go index 053f7b8e..0c8946c2 100644 --- a/service/mount.go +++ b/service/mount.go @@ -688,7 +688,10 @@ func unmountPrivMount( return err } // remove private mount if we can - if len(mnts) == 1 && mnts[0].Path == target { + for _, m := range mnts { + if m.Path != target { + continue + } if err := gofsutil.Unmount(ctx, target); err != nil { return err }