]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
bcachefs: io_read: remove from async obj list in rbio_done()
authorKent Overstreet <kent.overstreet@linux.dev>
Thu, 10 Jul 2025 20:27:29 +0000 (16:27 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 13 Jul 2025 21:45:13 +0000 (17:45 -0400)
Previously, only split rbios allocated in io_read.c would be removed
from the async obj list.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/io_read.c

index cd184b219a652d41feb89e8671ef3f43c2f29705..e0874ad9a6cf2402a49655182fd97b461e3303c5 100644 (file)
@@ -166,6 +166,7 @@ static noinline void promote_free(struct bch_read_bio *rbio)
        BUG_ON(ret);
 
        async_object_list_del(c, promote, op->list_idx);
+       async_object_list_del(c, rbio, rbio->list_idx);
 
        bch2_data_update_exit(&op->write);
 
@@ -456,6 +457,10 @@ static void bch2_rbio_done(struct bch_read_bio *rbio)
        if (rbio->start_time)
                bch2_time_stats_update(&rbio->c->times[BCH_TIME_data_read],
                                       rbio->start_time);
+#ifdef CONFIG_BCACHEFS_ASYNC_OBJECT_LISTS
+       if (rbio->list_idx)
+               async_object_list_del(rbio->c, rbio, rbio->list_idx);
+#endif
        bio_endio(&rbio->bio);
 }