From: Kent Overstreet Date: Sun, 13 Apr 2025 17:52:12 +0000 (-0400) Subject: bcachefs: bch2_dev_journal_alloc() now respects data_allowed X-Git-Tag: v6.16-rc1~211^2~179 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e0d51d00e84790dfad4191e0f50c33b7cac387c;p=thirdparty%2Flinux.git bcachefs: bch2_dev_journal_alloc() now respects data_allowed Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/journal.c b/fs/bcachefs/journal.c index 7522a618b9c97..366b5493ecf78 100644 --- a/fs/bcachefs/journal.c +++ b/fs/bcachefs/journal.c @@ -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;