Logging: Fix breakage when freeing the log ringbuffer
Commit
c6e1b84595039edb5c49a5851b440710dc0e2ac1 broke fetching from
the log ringbuffer. The solution there is still generally good: there
is no need to keep the ringbuffer in children created by
ctdb_fork()... except for those special children that are created to
fetch data from the ringbuffer!
Introduce a new function ctdb_fork_no_free_ringbuffer() that does
everything ctdb_fork() needs to do except free the ringbuffer (i.e. it
is the old ctdb_fork() function). The new ctdb_fork() function just
calls that function and then frees the ringbuffer in the child.
This means all callers of ctdb_fork() have the convenience of having
the ringbuffer freed, apart from the special case in the ringbuffer
fetching code where we call ctdb_fork_no_free_ringbuffer() instead.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(backported from commit
00db5fa00474f8a83f1aa3b603fd756cc9b49ff4)