提交 1a1974fd 编写于 作者: E Eric Sesterhenn / snakebyte 提交者: Mark Fasheh

[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: NEric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: NJoel Becker <joel.becker@oracle.com>
Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
上级 3d0f89bb
......@@ -196,8 +196,7 @@ const unsigned char * configfs_get_name(struct configfs_dirent *sd)
{
struct configfs_attribute *attr;
if (!sd || !sd->s_element)
BUG();
BUG_ON(!sd || !sd->s_element);
/* These always have a dentry, so use that */
if (sd->s_type & (CONFIGFS_DIR | CONFIGFS_ITEM_LINK))
......
......@@ -162,8 +162,7 @@ int configfs_unlink(struct inode *dir, struct dentry *dentry)
if (!(sd->s_type & CONFIGFS_ITEM_LINK))
goto out;
if (dentry->d_parent == configfs_sb->s_root)
BUG();
BUG_ON(dentry->d_parent == configfs_sb->s_root);
sl = sd->s_element;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册