diff --git a/internal/cephfs/controllerserver.go b/internal/cephfs/controllerserver.go index c8181ba7a..525493bf5 100644 --- a/internal/cephfs/controllerserver.go +++ b/internal/cephfs/controllerserver.go @@ -125,7 +125,7 @@ func checkContentSource(ctx context.Context, req *csi.CreateVolumeRequest, cr *u } // CreateVolume creates a reservation and the volume in backend, if it is not already present. -// nolint:gocognit:gocyclo // TODO: reduce complexity +// nolint:gocognit,gocyclo,nestif // TODO: reduce complexity func (cs *ControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error) { if err := cs.validateCreateVolumeRequest(req); err != nil { util.ErrorLog(ctx, "CreateVolumeRequest validation failed: %v", err) @@ -193,7 +193,6 @@ func (cs *ControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol // All errors other than ErrVolumeNotFound should return an error back to the caller if !errors.Is(purgeErr, ErrVolumeNotFound) { return nil, status.Error(codes.Internal, purgeErr.Error()) - } } errUndo := undoVolReservation(ctx, volOptions, *vID, secret) diff --git a/internal/cephfs/fsjournal.go b/internal/cephfs/fsjournal.go index 1e06c225d..5c567d056 100644 --- a/internal/cephfs/fsjournal.go +++ b/internal/cephfs/fsjournal.go @@ -55,7 +55,7 @@ because, the order of omap creation and deletion are inverse of each other, and request name lock, and hence any stale omaps are leftovers from incomplete transactions and are hence safe to garbage collect. */ -// nolint:gocognit:gocyclo // TODO: reduce complexity +// nolint:gocognit,gocyclo,nestif // TODO: reduce complexity func checkVolExists(ctx context.Context, volOptions, parentVolOpt *volumeOptions,