copy: avoid race between run_copy() and clash

This commit is contained in:
Thomas Schoebel-Theuer 2024-01-15 15:31:38 +01:00
parent 9fbaf12362
commit d5e7798310
1 changed files with 1 additions and 2 deletions

View File

@ -932,8 +932,7 @@ int _run_copy(struct copy_brick *brick, loff_t this_start)
int progress;
bool is_first;
if (READ_ONCE(brick->clash) &&
wait_reset_clash(brick))
if (READ_ONCE(brick->clash))
return 0;
if (this_start < brick->copy_last)