Skip to content
Commit 780f0e6a authored by Mike Rapoport's avatar Mike Rapoport Committed by Andrei Vagin
Browse files

lazy-pages: replace crappy num_children with simple reference counting



The purpose of the num_children field in 'struct lazy_pages_info' was to
prevent closing the page-read while there are still active processes that
share it. It did work for the case when handling of the child processes
finished before the parent process. However, if the parent lpi is closed
first, we've got a dangling pointer at lpi->parent.
The obvious solution is to use simple reference counting.

Signed-off-by: default avatarMike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: default avatarAndrei Vagin <avagin@virtuozzo.com>
parent 1d85ec97
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment