Skip to content

Commit 9466118

Browse files
authored
Merge pull request kubernetes#77229 from tedyu/csi-node-expansion
Return early when node expansion is determined
2 parents 55a0524 + ebe499e commit 9466118

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pkg/volume/csi/csi_client.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -681,16 +681,15 @@ func (c *csiDriverClient) NodeSupportsNodeExpand(ctx context.Context) (bool, err
681681

682682
capabilities := resp.GetCapabilities()
683683

684-
nodeExpandSet := false
685684
if capabilities == nil {
686685
return false, nil
687686
}
688687
for _, capability := range capabilities {
689688
if capability.GetRpc().GetType() == csipbv1.NodeServiceCapability_RPC_EXPAND_VOLUME {
690-
nodeExpandSet = true
689+
return true, nil
691690
}
692691
}
693-
return nodeExpandSet, nil
692+
return false, nil
694693
} else if c.nodeV0ClientCreator != nil {
695694
return false, nil
696695
}

0 commit comments

Comments
 (0)