bcachefs: Catch data_update_done events in trace_io_move_start_fail
authorKent Overstreet <kent.overstreet@linux.dev>
Wed, 28 May 2025 01:45:56 +0000 (21:45 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Fri, 30 May 2025 05:21:12 +0000 (01:21 -0400)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/move.c

index 4dd779b..857519c 100644 (file)
@@ -436,9 +436,6 @@ int bch2_move_extent(struct moving_context *ctxt,
 err_free:
        kfree(io);
 err:
-       if (bch2_err_matches(ret, BCH_ERR_data_update_done))
-               return 0;
-
        if (bch2_err_matches(ret, EROFS) ||
            bch2_err_matches(ret, BCH_ERR_transaction_restart))
                return ret;
@@ -454,6 +451,9 @@ err:
                trace_io_move_start_fail(c, buf.buf);
                printbuf_exit(&buf);
        }
+
+       if (bch2_err_matches(ret, BCH_ERR_data_update_done))
+               return 0;
        return ret;
 }