From e4130b2a02c82758f56da2026be38a27a09e3fb5 Mon Sep 17 00:00:00 2001 From: Danny Canter Date: Fri, 18 Nov 2022 03:04:32 -0800 Subject: [PATCH] overlay: Remove unused method param `getCleanupDirectories` didn't use the storage transactor. Signed-off-by: Danny Canter --- snapshots/overlay/overlay.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/snapshots/overlay/overlay.go b/snapshots/overlay/overlay.go index 50b8af10b..0ead676d3 100644 --- a/snapshots/overlay/overlay.go +++ b/snapshots/overlay/overlay.go @@ -289,7 +289,7 @@ func (o *snapshotter) Remove(ctx context.Context, key string) (err error) { if !o.asyncRemove { var removals []string - removals, err = o.getCleanupDirectories(ctx, t) + removals, err = o.getCleanupDirectories(ctx) if err != nil { return fmt.Errorf("unable to get directories for removal: %w", err) } @@ -360,10 +360,10 @@ func (o *snapshotter) cleanupDirectories(ctx context.Context) ([]string, error) } defer t.Rollback() - return o.getCleanupDirectories(ctx, t) + return o.getCleanupDirectories(ctx) } -func (o *snapshotter) getCleanupDirectories(ctx context.Context, t storage.Transactor) ([]string, error) { +func (o *snapshotter) getCleanupDirectories(ctx context.Context) ([]string, error) { ids, err := storage.IDMap(ctx) if err != nil { return nil, err @@ -386,7 +386,6 @@ func (o *snapshotter) getCleanupDirectories(ctx context.Context, t storage.Trans if _, ok := ids[d]; ok { continue } - cleanup = append(cleanup, filepath.Join(snapshotDir, d)) }