bcachefs: bch2_dev_journal_alloc() now respects data_allowed
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 13 Apr 2025 17:52:12 +0000 (13:52 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Thu, 22 May 2025 00:14:13 +0000 (20:14 -0400)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/journal.c

index 7522a618b9c97aa72ea9494c625b0b706cf37dac..366b5493ecf7840aaf17fb0d9203f8f609741289 100644 (file)
@@ -1298,6 +1298,9 @@ int bch2_set_nr_journal_buckets(struct bch_fs *c, struct bch_dev *ca,
 
 int bch2_dev_journal_alloc(struct bch_dev *ca, bool new_fs)
 {
+       if (!(ca->mi.data_allowed & BIT(BCH_DATA_journal)))
+               return 0;
+
        unsigned nr;
        int ret;