On Tue, 11 Jun 2024 21:39:37 -0400 Steven Rostedt <rost...@goodmis.org> wrote:
> > > > Maybe explain why sometimes __rb_inc_dec_mapped() is called to > > increment or decrement ->mapped, and sometimes it id done directly ? > > I can see that the function also acquires the buffer mutex, which > > isn't needed at the places where mapped is incremented/decremented > > directly, but common code would still be nice, and it is odd to see > > over/underflows handled sometimes but not always. > > Sure. I'll add comments explaining more. And I found a bug with this code. It assumes that mapped will be equal to 1 if it's the last mapping. That will no longer be the case. -- Steve