[PATCH 5.10 005/317] ring-buffer: Fix a race between readers and resize checks