From cc68afd85542c93fc84377a4af7c196c1d1e253e Mon Sep 17 00:00:00 2001 From: Andrei Vagin Date: Mon, 28 Nov 2022 10:47:44 -0800 Subject: [PATCH] refs: remove the nosplit annotation from DecRefWithDestructor and DecDef First, they call a destructor that can be without the nosplit tag. Second, they calls Mutex.Lock and Mutex.Unlock that are not marked as nosplit. Fixes: #8149 Signed-off-by: Andrei Vagin --- pkg/refs/refcounter.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkg/refs/refcounter.go b/pkg/refs/refcounter.go index c0bb74ae9..3a069c0b9 100644 --- a/pkg/refs/refcounter.go +++ b/pkg/refs/refcounter.go @@ -485,8 +485,6 @@ func (r *AtomicRefCount) dropWeakRef(w *WeakRef) { // A: TryIncRef [speculative increase => sees non-negative references] // B: DecRef [real decrease] // A: TryIncRef [transform speculative to real] -// -//go:nosplit func (r *AtomicRefCount) DecRefWithDestructor(ctx context.Context, destroy func(context.Context)) { switch v := r.refCount.Add(-1); { case v < -1: @@ -522,8 +520,6 @@ func (r *AtomicRefCount) DecRefWithDestructor(ctx context.Context, destroy func( } // DecRef decrements this object's reference count. -// -//go:nosplit func (r *AtomicRefCount) DecRef(ctx context.Context) { r.DecRefWithDestructor(ctx, nil) }