bcachefs: fix a mount error path
authorKent Overstreet <kent.overstreet@gmail.com>
Tue, 21 May 2019 17:42:02 +0000 (13:42 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:22 +0000 (17:08 -0400)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/fs.c

index defd35d047504584bd74d3a757347ee822b89f85..afe930532224f3ff0577ca31fee232fde1dde7ad 100644 (file)
@@ -1597,7 +1597,7 @@ static struct bch_fs *__bch2_open_as_blockdevs(const char *dev_name, char * cons
                 */
 
                c1 = bch2_path_to_fs(devs[0]);
-               if (!c1)
+               if (IS_ERR(c1))
                        return c;
 
                for (i = 1; i < nr_devs; i++) {