]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
bcachefs: Kill other unreachable() uses
authorKent Overstreet <kent.overstreet@linux.dev>
Thu, 14 Sep 2023 00:39:31 +0000 (20:39 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:10:13 +0000 (17:10 -0400)
Per previous commit, bare unreachable() considered harmful, convert to
BUG()

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/bset.c
fs/bcachefs/ec.h

index cff7486ef446adaf05b05e27fc0f9ac2502d7e16..bb73ba9017b006e7fe181e19b7cccfe8494c1339 100644 (file)
@@ -1189,7 +1189,7 @@ struct bkey_packed *__bch2_bset_search(struct btree *b,
        case BSET_RO_AUX_TREE:
                return bset_search_tree(b, t, search, lossy_packed_search);
        default:
-               unreachable();
+               BUG();
        }
 }
 
index 885ae5d5165587e4f72312401edcf1b67dcff964..966d165a3b6602c200f0be8c4090be6d8027e7ea 100644 (file)
@@ -240,7 +240,7 @@ static inline void ec_stripe_new_put(struct bch_fs *c, struct ec_stripe_new *s,
                        bch2_ec_do_stripe_creates(c);
                        break;
                default:
-                       unreachable();
+                       BUG();
                }
 }