From: Kent Overstreet Date: Fri, 17 Jun 2022 23:15:26 +0000 (-0400) Subject: bcachefs: Fix assertion in bch2_dev_list_add_dev() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=2ed6248ab3a58dbbe5819cbd0e60e4e3a5b72c47;p=linux.git bcachefs: Fix assertion in bch2_dev_list_add_dev() We were only allowing 4 devices in a dev_list, not 16. Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/super.h b/fs/bcachefs/super.h index 359fa1e7fc186..d66de6f589ace 100644 --- a/fs/bcachefs/super.h +++ b/fs/bcachefs/super.h @@ -89,7 +89,7 @@ static inline void bch2_dev_list_add_dev(struct bch_devs_list *devs, unsigned dev) { BUG_ON(bch2_dev_list_has_dev(*devs, dev)); - BUG_ON(devs->nr >= BCH_REPLICAS_MAX); + BUG_ON(devs->nr >= ARRAY_SIZE(devs->devs)); devs->devs[devs->nr++] = dev; }