From: Kent Overstreet Date: Thu, 24 Aug 2023 21:07:50 +0000 (-0400) Subject: bcachefs: Kill stripe check in bch2_alloc_v4_invalid() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=cba37d81f5c34197e815bcd60f075be232ae6783;p=linux.git bcachefs: Kill stripe check in bch2_alloc_v4_invalid() Since we set bucket data type to BCH_DATA_stripe based on the data pointer, not just the stripe pointer, it doesn't make sense to check for no stripe in the .key_invalid method - this is a situation that shouldn't happen, but our other fsck/repair code handles it. Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/alloc_background.c b/fs/bcachefs/alloc_background.c index ad82fbddcbf83..e36426b52a4a4 100644 --- a/fs/bcachefs/alloc_background.c +++ b/fs/bcachefs/alloc_background.c @@ -296,11 +296,6 @@ int bch2_alloc_v4_invalid(const struct bch_fs *c, struct bkey_s_c k, } break; case BCH_DATA_stripe: - if (!a.v->stripe) { - prt_printf(err, "data_type %s but stripe==0", - bch2_data_types[a.v->data_type]); - return -BCH_ERR_invalid_bkey; - } break; }