[PATCH 5.10 55/62] ring-buffer: Fix writing to the buffer with max_data_size