public inbox for linux-bcachefs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bcachefs: fix error checking in bch2_fs_alloc()
@ 2023-09-14  9:47 Dan Carpenter
  2023-09-14 11:50 ` Brian Foster
  2023-09-14 19:58 ` Kent Overstreet
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2023-09-14  9:47 UTC (permalink / raw)
  To: Kent Overstreet; +Cc: Brian Foster, linux-bcachefs, kernel-janitors

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>
---
 fs/bcachefs/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/bcachefs/super.c b/fs/bcachefs/super.c
index 29cd71445a94..4831010c0dfd 100644
--- a/fs/bcachefs/super.c
+++ b/fs/bcachefs/super.c
@@ -856,7 +856,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;
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-09-14 19:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-14  9:47 [PATCH] bcachefs: fix error checking in bch2_fs_alloc() Dan Carpenter
2023-09-14 11:50 ` Brian Foster
2023-09-14 19:58 ` Kent Overstreet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox