From 484657210940e36d83b1aec312a55d07a59b28ec 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 c8085133d77f..7e9b4936eaf2 100644 --- a/lxd/storage/drivers/utils.go +++ b/lxd/storage/drivers/utils.go @@ -219,23 +219,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) {