]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/fs-io.c
Update bcachefs sources to 0342eebf85 bcachefs: Improve the backpointer to missing...
[bcachefs-tools-debian] / libbcachefs / fs-io.c
index b511735b377204f42cfd5bfa2ae50231fc593700..df2f317f544347c2fc9d3ca3ccf06ba98cc2d2af 100644 (file)
@@ -3706,16 +3706,22 @@ int bch2_fs_fsio_init(struct bch_fs *c)
 
        if (bioset_init(&c->writepage_bioset,
                        4, offsetof(struct bch_writepage_io, op.wbio.bio),
-                       BIOSET_NEED_BVECS) ||
-           bioset_init(&c->dio_read_bioset,
+                       BIOSET_NEED_BVECS))
+               return -BCH_ERR_ENOMEM_writepage_bioset_init;
+
+       if (bioset_init(&c->dio_read_bioset,
                        4, offsetof(struct dio_read, rbio.bio),
-                       BIOSET_NEED_BVECS) ||
-           bioset_init(&c->dio_write_bioset,
+                       BIOSET_NEED_BVECS))
+               return -BCH_ERR_ENOMEM_dio_read_bioset_init;
+
+       if (bioset_init(&c->dio_write_bioset,
                        4, offsetof(struct dio_write, op.wbio.bio),
-                       BIOSET_NEED_BVECS) ||
-           bioset_init(&c->nocow_flush_bioset,
+                       BIOSET_NEED_BVECS))
+               return -BCH_ERR_ENOMEM_dio_write_bioset_init;
+
+       if (bioset_init(&c->nocow_flush_bioset,
                        1, offsetof(struct nocow_flush, bio), 0))
-               ret = -ENOMEM;
+               return -BCH_ERR_ENOMEM_nocow_flush_bioset_init;
 
        pr_verbose_init(c->opts, "ret %i", ret);
        return ret;