From 7c580af412bd7faed459f5d2109040aa1cbc1459 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Wed, 4 Nov 2020 13:58:12 +0100 Subject: [PATCH] cephfs: remove unused Credentials argument from createSnapshot() Signed-off-by: Niels de Vos --- internal/cephfs/clone.go | 2 +- internal/cephfs/controllerserver.go | 2 +- internal/cephfs/snapshot.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/cephfs/clone.go b/internal/cephfs/clone.go index 3144f28e1..2350d4e61 100644 --- a/internal/cephfs/clone.go +++ b/internal/cephfs/clone.go @@ -45,7 +45,7 @@ const ( func createCloneFromSubvolume(ctx context.Context, volID, cloneID volumeID, volOpt, parentvolOpt *volumeOptions, cr *util.Credentials) error { snapshotID := cloneID - err := parentvolOpt.createSnapshot(ctx, cr, snapshotID, volID) + err := parentvolOpt.createSnapshot(ctx, snapshotID, volID) if err != nil { util.ErrorLog(ctx, "failed to create snapshot %s %v", snapshotID, err) return err diff --git a/internal/cephfs/controllerserver.go b/internal/cephfs/controllerserver.go index 4169f70ab..3d2607aa5 100644 --- a/internal/cephfs/controllerserver.go +++ b/internal/cephfs/controllerserver.go @@ -587,7 +587,7 @@ func doSnapshot(ctx context.Context, volOpt *volumeOptions, subvolumeName, snaps volID := volumeID(subvolumeName) snapID := volumeID(snapshotName) snap := snapshotInfo{} - err := volOpt.createSnapshot(ctx, cr, snapID, volID) + err := volOpt.createSnapshot(ctx, snapID, volID) if err != nil { util.ErrorLog(ctx, "failed to create snapshot %s %v", snapID, err) return snap, err diff --git a/internal/cephfs/snapshot.go b/internal/cephfs/snapshot.go index 8022fbb24..fec7cad4c 100644 --- a/internal/cephfs/snapshot.go +++ b/internal/cephfs/snapshot.go @@ -45,7 +45,7 @@ type cephfsSnapshot struct { ReservedID string } -func (vo *volumeOptions) createSnapshot(ctx context.Context, cr *util.Credentials, snapID, volID volumeID) error { +func (vo *volumeOptions) createSnapshot(ctx context.Context, snapID, volID volumeID) error { fsa, err := vo.conn.GetFSAdmin() if err != nil { util.ErrorLog(ctx, "could not get FSAdmin: %s", err)