Skip to content

Commit 23bba14

Browse files
committed
Address one more comment
1 parent 37d5705 commit 23bba14

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pkg/common-controller/snapshot_controller.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,6 @@ func (ctrl *csiSnapshotCommonController) processIfDeletionTimestampSet(snapshot
235235
func (ctrl *csiSnapshotCommonController) checkandRemoveSnapshotFinalizersAndCheckandDeleteContent(snapshot *crdv1.VolumeSnapshot, content *crdv1.VolumeSnapshotContent, deleteContent bool) error {
236236
klog.V(5).Infof("checkandRemoveSnapshotFinalizersAndCheckandDeleteContent VolumeSnapshot[%s]: %s", utils.SnapshotKey(snapshot), utils.GetSnapshotStatusForLogging(snapshot))
237237

238-
var err error
239238
// Check is snapshot deletionTimestamp is set and any finalizer is on
240239
if utils.IsSnapshotDeletionCandidate(snapshot) {
241240
// Volume snapshot should be deleted. Check if it's used
@@ -258,7 +257,7 @@ func (ctrl *csiSnapshotCommonController) checkandRemoveSnapshotFinalizersAndChec
258257
}
259258
}
260259

261-
if !inUse || (content == nil && err == nil) {
260+
if !inUse {
262261
klog.V(5).Infof("checkandRemoveSnapshotFinalizersAndCheckandDeleteContent: Remove Finalizer for VolumeSnapshot[%s]", utils.SnapshotKey(snapshot))
263262
doesContentExist := false
264263
if content != nil {

0 commit comments

Comments
 (0)