Skip to content

Instantly share code, notes, and snippets.

@YellowOnion
Created June 13, 2022 21:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save YellowOnion/0068c9dad2f80e5a3e2c2c31876167f5 to your computer and use it in GitHub Desktop.
Save YellowOnion/0068c9dad2f80e5a3e2c2c31876167f5 to your computer and use it in GitHub Desktop.
diff --git a/fs/bcachefs/move.c b/fs/bcachefs/move.c
index 2847000ec60c..2193d8f022c5 100644
--- a/fs/bcachefs/move.c
+++ b/fs/bcachefs/move.c
@@ -946,12 +946,12 @@ int bch2_evacuate_bucket(struct bch_fs *c,
ret = bch2_get_next_backpointer(&trans, bucket, gen,
&bp_offset, &bp, &bp_pos);
+ if (bp_offset == U64_MAX)
+ break;
if (ret == -EINTR)
continue;
if (ret)
goto err;
- if (bp_offset == U64_MAX)
- break;
if (!bp.level) {
struct bkey_s_c k;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment