Skip to content

Commit

Permalink
Do not choke when checking the lock of non-existent nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
aduffeck committed Feb 3, 2022
1 parent ade962a commit c0b5ba9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/storage/utils/decomposedfs/decomposedfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit c0b5ba9

Please sign in to comment.