From 451242b80094e9766c7a25b1057da6611d092243 Mon Sep 17 00:00:00 2001 From: Din Music Date: Fri, 20 Dec 2024 14:47:00 +0000 Subject: [PATCH] lxd/storage/drivers/utils: Remove no longer used waitGone function (linter) Signed-off-by: Din Music --- lxd/storage/drivers/utils.go | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/lxd/storage/drivers/utils.go b/lxd/storage/drivers/utils.go index 314c30dd29a6..ac8337370c17 100644 --- a/lxd/storage/drivers/utils.go +++ b/lxd/storage/drivers/utils.go @@ -220,23 +220,6 @@ func tryExists(ctx context.Context, path string) bool { } } -// waitGone waits for a file to not exist anymore or the context being cancelled. -// The probe happens at intervals of 500 milliseconds. -func waitGone(ctx context.Context, path string) bool { - for { - select { - case <-ctx.Done(): - return false - default: - if !shared.PathExists(path) { - return true - } - } - - time.Sleep(500 * time.Millisecond) - } -} - // fsUUID returns the filesystem UUID for the given block path. // error is returned if the given block device exists but has no UUID. func fsUUID(path string) (string, error) {