Implements hook_field_delete_revision().
function file_field_delete_revision($entity_type, $entity, $field, $instance, $langcode, &$items) {
foreach ($items as $delta => $item) {
// Decrement the file usage count by 1.
file_usage()
->delete(file_load($item['fid']), 'file', $entity_type, $entity
->id());
}
}