Commit 547bc926 authored by Eric Sesterhenn's avatar Eric Sesterhenn Committed by Adrian Bunk

BUG_ON() Conversion in md/dm-table.c

this changes if() BUG(); constructs to BUG_ON() which is
cleaner and can better optimized away
Signed-off-by: default avatarEric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
parent c163c729
...@@ -352,8 +352,7 @@ static int open_dev(struct dm_dev *d, dev_t dev) ...@@ -352,8 +352,7 @@ static int open_dev(struct dm_dev *d, dev_t dev)
int r; int r;
if (d->bdev) BUG_ON(d->bdev);
BUG();
bdev = open_by_devnum(dev, d->mode); bdev = open_by_devnum(dev, d->mode);
if (IS_ERR(bdev)) if (IS_ERR(bdev))
...@@ -427,8 +426,7 @@ static int __table_get_device(struct dm_table *t, struct dm_target *ti, ...@@ -427,8 +426,7 @@ static int __table_get_device(struct dm_table *t, struct dm_target *ti,
struct dm_dev *dd; struct dm_dev *dd;
unsigned int major, minor; unsigned int major, minor;
if (!t) BUG_ON(!t);
BUG();
if (sscanf(path, "%u:%u", &major, &minor) == 2) { if (sscanf(path, "%u:%u", &major, &minor) == 2) {
/* Extract the major/minor numbers */ /* Extract the major/minor numbers */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment