diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-08-04 10:51:02 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:10:09 -0400 |
commit | f6e6f42bbbe5e421b57182bb0c92a237701ca889 (patch) | |
tree | 7c3b8e8a165914090951093c5edbd60650613c11 /fs/bcachefs/movinggc.c | |
parent | 56046e3ecce5e9acf543884577d7fbad454de856 (diff) | |
download | lwn-f6e6f42bbbe5e421b57182bb0c92a237701ca889.tar.gz lwn-f6e6f42bbbe5e421b57182bb0c92a237701ca889.zip |
bcachefs: Fix for bch2_copygc() spuriously returning -EEXIST
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/movinggc.c')
-rw-r--r-- | fs/bcachefs/movinggc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/bcachefs/movinggc.c b/fs/bcachefs/movinggc.c index 5242f20bb680..256431a6dc0c 100644 --- a/fs/bcachefs/movinggc.c +++ b/fs/bcachefs/movinggc.c @@ -220,8 +220,10 @@ static int bch2_copygc(struct btree_trans *trans, f = move_bucket_in_flight_add(buckets_in_flight, *i); 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; + } if (ret == -ENOMEM) { /* flush IO, continue later */ ret = 0; break; |