[PATCH 06/11] audit: Factor out chunk replacement code