]> git.itanic.dy.fi Git - linux-stable/commitdiff
bcachefs: fix error checking in bch2_fs_alloc()
authorDan Carpenter <dan.carpenter@linaro.org>
Thu, 14 Sep 2023 09:47:44 +0000 (12:47 +0300)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:10:14 +0000 (17:10 -0400)
There is a typo here where it uses ";" instead of "?:".  The result is
that bch2_fs_fs_io_direct_init() is called unconditionally and the errors
from it are not checked.

Fixes: 0060c68159fc ("bcachefs: Split up fs-io.[ch]")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Reviewed-by: Brian Foster <bfoster@redhat.com>
fs/bcachefs/super.c

index 2990eed85adf5ecdcb788dfcc9e5cee6f44917ca..e94a63a22704a3b2490348eec763b2e0cf507a7a 100644 (file)
@@ -852,7 +852,7 @@ static struct bch_fs *bch2_fs_alloc(struct bch_sb *sb, struct bch_opts opts)
            bch2_fs_compress_init(c) ?:
            bch2_fs_ec_init(c) ?:
            bch2_fs_fsio_init(c) ?:
-           bch2_fs_fs_io_buffered_init(c);
+           bch2_fs_fs_io_buffered_init(c) ?:
            bch2_fs_fs_io_direct_init(c);
        if (ret)
                goto err;