]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
bcachefs: Don't create bch_io_failures unless it's needed
authorKent Overstreet <kent.overstreet@linux.dev>
Mon, 10 Mar 2025 15:54:13 +0000 (11:54 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 16 Mar 2025 17:47:55 +0000 (13:47 -0400)
Only needed in retry path, no point in wasting stack space.

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

index 73275da5d2c4bb1f262019b25b2dffc14059f0ca..6bdb8efb4cd147b2237a96eb2fea44327e7e9c0d 100644 (file)
@@ -147,13 +147,11 @@ void __bch2_read(struct bch_fs *, struct bch_read_bio *, struct bvec_iter,
 static inline void bch2_read(struct bch_fs *c, struct bch_read_bio *rbio,
                             subvol_inum inum)
 {
-       struct bch_io_failures failed = { .nr = 0 };
-
        BUG_ON(rbio->_state);
 
        rbio->subvol = inum.subvol;
 
-       __bch2_read(c, rbio, rbio->bio.bi_iter, inum, &failed,
+       __bch2_read(c, rbio, rbio->bio.bi_iter, inum, NULL,
                    BCH_READ_retry_if_stale|
                    BCH_READ_may_promote|
                    BCH_READ_user_mapped);