[PATCH 5.15 73/83] ring-buffer: Fix writing to the buffer with max_data_size