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:Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
Showing
Please
register
or
sign in
to comment