mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-17 20:00:23 +00:00
rbd: remove unwanted condition check in flattenCloneImage
All the previous condition checks exit from the function and when it reach to this block its obvious that error is non nil, we dont need an extra check here. Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
parent
5598c279da
commit
4cb7d2bbbd
@ -244,10 +244,8 @@ func (rv *rbdVolume) flattenCloneImage(ctx context.Context) error {
|
|||||||
if err == nil {
|
if err == nil {
|
||||||
return tempClone.flattenRbdImage(ctx, tempClone.conn.Creds, false, hardLimit, softLimit)
|
return tempClone.flattenRbdImage(ctx, tempClone.conn.Creds, false, hardLimit, softLimit)
|
||||||
}
|
}
|
||||||
if err != nil {
|
if !errors.Is(err, ErrImageNotFound) {
|
||||||
if !errors.Is(err, ErrImageNotFound) {
|
return err
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return rv.flattenRbdImage(ctx, rv.conn.Creds, false, hardLimit, softLimit)
|
return rv.flattenRbdImage(ctx, rv.conn.Creds, false, hardLimit, softLimit)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user