bcachefs: Fix for bch2_copygc() spuriously returning -EEXIST
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
@@ -220,8 +220,10 @@ static int bch2_copygc(struct btree_trans *trans,
|
|||||||
|
|
||||||
f = move_bucket_in_flight_add(buckets_in_flight, *i);
|
f = move_bucket_in_flight_add(buckets_in_flight, *i);
|
||||||
ret = PTR_ERR_OR_ZERO(f);
|
ret = PTR_ERR_OR_ZERO(f);
|
||||||
if (ret == -EEXIST) /* rare race: copygc_get_buckets returned same bucket more than once */
|
if (ret == -EEXIST) { /* rare race: copygc_get_buckets returned same bucket more than once */
|
||||||
|
ret = 0;
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
if (ret == -ENOMEM) { /* flush IO, continue later */
|
if (ret == -ENOMEM) { /* flush IO, continue later */
|
||||||
ret = 0;
|
ret = 0;
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user