From 8d08e8b37e5d3b91ae880988958a48f50a878176 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Wed, 4 Nov 2020 11:28:06 +0100 Subject: [PATCH] cephfs: remove unused Credentials argument from getCloneState() Signed-off-by: Niels de Vos --- internal/cephfs/clone.go | 6 +++--- internal/cephfs/fsjournal.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/cephfs/clone.go b/internal/cephfs/clone.go index 567d4a94b..99dbc5573 100644 --- a/internal/cephfs/clone.go +++ b/internal/cephfs/clone.go @@ -93,7 +93,7 @@ func createCloneFromSubvolume(ctx context.Context, volID, cloneID volumeID, volO return cloneErr } - cloneState, cloneErr := volOpt.getCloneState(ctx, cr, cloneID) + cloneState, cloneErr := volOpt.getCloneState(ctx, cloneID) if cloneErr != nil { return cloneErr } @@ -183,7 +183,7 @@ func createCloneFromSnapshot(ctx context.Context, parentVolOpt, volOptions *volu } }() - cloneState, err := volOptions.getCloneState(ctx, cr, volumeID(vID.FsSubvolName)) + cloneState, err := volOptions.getCloneState(ctx, volumeID(vID.FsSubvolName)) if err != nil { return err } @@ -208,7 +208,7 @@ func createCloneFromSnapshot(ctx context.Context, parentVolOpt, volOptions *volu return nil } -func (vo *volumeOptions) getCloneState(ctx context.Context, cr *util.Credentials, volID volumeID) (cephFSCloneState, error) { +func (vo *volumeOptions) getCloneState(ctx context.Context, volID volumeID) (cephFSCloneState, error) { fsa, err := vo.conn.GetFSAdmin() if err != nil { util.ErrorLog(ctx, "could not get FSAdmin, can get clone status for volume %s with ID %s: %v", vo.FsName, string(volID), err) diff --git a/internal/cephfs/fsjournal.go b/internal/cephfs/fsjournal.go index 53b5c14e2..ee1cc8691 100644 --- a/internal/cephfs/fsjournal.go +++ b/internal/cephfs/fsjournal.go @@ -83,7 +83,7 @@ func checkVolExists(ctx context.Context, vid.FsSubvolName = imageData.ImageAttributes.ImageName if sID != nil || pvID != nil { - cloneState, cloneStateErr := volOptions.getCloneState(ctx, cr, volumeID(vid.FsSubvolName)) + cloneState, cloneStateErr := volOptions.getCloneState(ctx, volumeID(vid.FsSubvolName)) if cloneStateErr != nil { if errors.Is(cloneStateErr, ErrVolumeNotFound) { if pvID != nil {