Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 52e5f9d1 authored by Eric Sesterhenn's avatar Eric Sesterhenn Committed by Adrian Bunk
Browse files

BUG_ON cleanup for drivers/md/



This changes two if() BUG(); usages to BUG_ON(); so people
can disable it safely.

Signed-off-by: default avatarEric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
parent 70d63ccc
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -4438,8 +4438,7 @@ static int md_release(struct inode *inode, struct file * file)
{
 	mddev_t *mddev = inode->i_bdev->bd_disk->private_data;

	if (!mddev)
		BUG();
	BUG_ON(!mddev);
	mddev_put(mddev);

	return 0;
+1 −1
Original line number Diff line number Diff line
@@ -1105,7 +1105,7 @@ static void compute_parity6(struct stripe_head *sh, int method)
				if (test_and_clear_bit(R5_Overlap, &sh->dev[i].flags))
					wake_up(&conf->wait_for_overlap);

				if (sh->dev[i].written) BUG();
				BUG_ON(sh->dev[i].written);
				sh->dev[i].written = chosen;
			}
		break;