diff --git a/csi/node.go b/csi/node.go index 488bd41e2..6deece075 100644 --- a/csi/node.go +++ b/csi/node.go @@ -364,8 +364,8 @@ func (s *OsdCsiServer) NodeGetVolumeStats(ctx context.Context, req *csi.NodeGetV } var attachPathMatch bool + sharedPath := fmt.Sprintf("%s/%s", api.SharedVolExportPrefix, id) for _, attachPath := range vol.AttachPath { - sharedPath := fmt.Sprintf("%s/%s", api.SharedVolExportPrefix, id) if attachPath == path || attachPath == sharedPath { attachPathMatch = true }