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

Commit 1a1974fd authored by Eric Sesterhenn / snakebyte's avatar Eric Sesterhenn / snakebyte Committed by Mark Fasheh
Browse files

[PATCH] BUG_ON() Conversion in fs/configfs/



this changes if() BUG(); constructs to BUG_ON() which is
cleaner, contains unlikely() and can better optimized away.

Signed-off-by: default avatarEric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: default avatarJoel Becker <joel.becker@oracle.com>
Signed-off-by: default avatarMark Fasheh <mark.fasheh@oracle.com>
parent 3d0f89bb
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -196,8 +196,7 @@ const unsigned char * configfs_get_name(struct configfs_dirent *sd)
{
{
	struct configfs_attribute *attr;
	struct configfs_attribute *attr;


	if (!sd || !sd->s_element)
	BUG_ON(!sd || !sd->s_element);
		BUG();


	/* These always have a dentry, so use that */
	/* These always have a dentry, so use that */
	if (sd->s_type & (CONFIGFS_DIR | CONFIGFS_ITEM_LINK))
	if (sd->s_type & (CONFIGFS_DIR | CONFIGFS_ITEM_LINK))
+1 −2
Original line number Original line Diff line number Diff line
@@ -162,8 +162,7 @@ int configfs_unlink(struct inode *dir, struct dentry *dentry)
	if (!(sd->s_type & CONFIGFS_ITEM_LINK))
	if (!(sd->s_type & CONFIGFS_ITEM_LINK))
		goto out;
		goto out;


	if (dentry->d_parent == configfs_sb->s_root)
	BUG_ON(dentry->d_parent == configfs_sb->s_root);
		BUG();


	sl = sd->s_element;
	sl = sd->s_element;