copy: safeguard any re-triggered writes

This commit is contained in:
Thomas Schoebel-Theuer 2022-06-16 00:08:26 +02:00
parent c9f1854f3c
commit b555ba5d81
1 changed files with 5 additions and 0 deletions

View File

@ -679,6 +679,11 @@ restart:
progress = -EINTR;
break;
}
/* Wait until any previous writeouts have finished.
*/
if (READ_ONCE(st->active[1])) {
goto idle;
}
/* start writeout */
status = _make_mref(brick, index, 1, mref0->ref_data,
pos, pos + mref0->ref_len,