Skip to content

Commit

Permalink
Fix logs messages
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaliy-leschenko committed Aug 8, 2022
1 parent a531ba4 commit 5584e1f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/mounter/safe_mounter_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (mounter *csiProxyMounter) SMBMount(source, target, fsType string, mountOpt

mappingPath, err := getRootMappingPath(source)
if err != nil {
return fmt.Errorf("getRootMappingPath(%s) failed with %v", source, err)
return fmt.Errorf("getRootMappingPath(%s) failed with error: %v", source, err)
}
unlock := lock(mappingPath)
defer unlock()
Expand All @@ -126,7 +126,7 @@ func (mounter *csiProxyMounter) SMBMount(source, target, fsType string, mountOpt
klog.V(2).Infof("mount %s on %s successfully", source, normalizedTarget)

if err = incementRemotePathReferencesCount(mappingPath, source); err != nil {
klog.Warningf("incementMappingPathCount(%s, %s) failed with %v", mappingPath, source, err)
klog.Warningf("incementMappingPathCount(%s, %s) failed with error: %v", mappingPath, source, err)
}

return nil
Expand All @@ -143,15 +143,15 @@ func (mounter *csiProxyMounter) SMBUnmount(target string) error {
}
mappingPath, err := getRootMappingPath(remotePath)
if err != nil {
klog.Warningf("getRootMappingPath(%s) failed with %v", remotePath, err)
klog.Warningf("getRootMappingPath(%s) failed with error: %v", remotePath, err)
} else {
klog.V(4).Infof("SMBUnmount: remote path: %s, mapping path: %s", remotePath, mappingPath)

unlock := lock(mappingPath)
defer unlock()

if err := decrementRemotePathReferencesCount(mappingPath, remotePath); err != nil {
klog.Warningf("decrementMappingPathCount(%s, %d) failed with %v", mappingPath, remotePath, err)
klog.Warningf("decrementMappingPathCount(%s, %d) failed with error: %v", mappingPath, remotePath, err)
} else {
count := getRemotePathReferencesCount(mappingPath)
if count == 0 {
Expand Down

0 comments on commit 5584e1f

Please sign in to comment.