[NTOSKRNL] Misc fixes to VACB reference counting
authorPierre Schweitzer <pierre@reactos.org>
Sat, 17 Mar 2018 10:56:25 +0000 (11:56 +0100)
committerPierre Schweitzer <pierre@reactos.org>
Sat, 17 Mar 2018 10:56:25 +0000 (11:56 +0100)
commit13b57fb5b5688a5e67175e0908f1fe7ad272045b
treefa260ed15035890f293c61003e6b6b05144d354d
parentad3bda1c8dd0c79541d59d2ea483d2de04c043b0
[NTOSKRNL] Misc fixes to VACB reference counting
This fixes various bugs linked to VACB counting:
- VACB not released when it should be
- Reference count expectations not being accurate

For the record, VACB should always have at least a reference
count of 1, unless you are to free it and removed it from
any linked list.

This commit also adds a bunch of asserts that should
help triggering invalid reference counting.

It should also fix numerous ASSERT currently triggered and
may help fixing random behaviours in Cc.

CORE-14285
CORE-14401
CORE-14293
ntoskrnl/cc/fs.c
ntoskrnl/cc/pin.c
ntoskrnl/cc/view.c
ntoskrnl/include/internal/cc.h