]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] BUG_ON() Conversion in fs/configfs/
authorEric Sesterhenn / snakebyte <snakebyte@gmx.de>
Fri, 27 Jan 2006 09:32:24 +0000 (10:32 +0100)
committerMark Fasheh <mark.fasheh@oracle.com>
Fri, 3 Feb 2006 22:03:09 +0000 (14:03 -0800)
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>
fs/configfs/inode.c
fs/configfs/symlink.c

index 737842f2764b5ce3b27fbc2fee53b91b6f06d7b9..c153bd9534cb6d72066094c8110ce0f35fec3ff3 100644 (file)
@@ -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))
index 99137026b40928c36e3980847e7e96154043d889..e5512e295cf2970b865d7ee398ed41d87634e067 100644 (file)
@@ -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;