[PATCH OLK-6.6 152/157] ring-buffer: Fix writing to the buffer with max_data_size