From: Eric Sesterhenn / snakebyte Date: Fri, 27 Jan 2006 09:32:24 +0000 (+0100) Subject: [PATCH] BUG_ON() Conversion in fs/configfs/ X-Git-Tag: v2.6.16-rc3~209^2~1 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a1974fd4533afdb73873cdacb942d9a79ff7c9b;p=linux-2.6 [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: Eric Sesterhenn Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh --- diff --git a/fs/configfs/inode.c b/fs/configfs/inode.c index 737842f276..c153bd9534 100644 --- a/fs/configfs/inode.c +++ b/fs/configfs/inode.c @@ -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)) diff --git a/fs/configfs/symlink.c b/fs/configfs/symlink.c index 99137026b4..e5512e295c 100644 --- a/fs/configfs/symlink.c +++ b/fs/configfs/symlink.c @@ -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;