From c0b5ba97773077036ba7d96433bc3fe02831b3b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Duffeck?= Date: Thu, 3 Feb 2022 10:49:26 +0100 Subject: [PATCH] Do not choke when checking the lock of non-existent nodes --- pkg/storage/utils/decomposedfs/decomposedfs.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/storage/utils/decomposedfs/decomposedfs.go b/pkg/storage/utils/decomposedfs/decomposedfs.go index 6a205411b32..3c075411b49 100644 --- a/pkg/storage/utils/decomposedfs/decomposedfs.go +++ b/pkg/storage/utils/decomposedfs/decomposedfs.go @@ -774,6 +774,10 @@ func (fs *Decomposedfs) Unlock(ctx context.Context, ref *provider.Reference, loc } func (fs *Decomposedfs) checkLock(ctx context.Context, node *node.Node) error { + if node == nil { + return nil // no node, no lock + } + lockID, _ := ctxpkg.ContextGetLockID(ctx) lock := node.ReadLock(ctx) if lock != nil {