Skip to content

Commit

Permalink
[PATCH] BUG_ON() Conversion in fs/configfs/
Browse files Browse the repository at this point in the history
this changes if() BUG(); constructs to BUG_ON() which is
cleaner, contains unlikely() and can better optimized away.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
  • Loading branch information
Eric Sesterhenn / snakebyte authored and Mark Fasheh committed Feb 3, 2006
1 parent 3d0f89b commit 1a1974f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions fs/configfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
3 changes: 1 addition & 2 deletions fs/configfs/symlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 1a1974f

Please sign in to comment.