From: Eric Sesterhenn Date: Sun, 26 Mar 2006 16:29:26 +0000 (+0200) Subject: BUG_ON() Conversion in kernel/fork.c X-Git-Tag: v2.6.17-rc1~480^2~7 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=910dea7fdda22f0ee83d26d459e460c79ed94557;p=linux-2.6 BUG_ON() Conversion in kernel/fork.c 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: Adrian Bunk --- diff --git a/kernel/fork.c b/kernel/fork.c index a02063903a..d93ab2ba72 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -769,8 +769,7 @@ int unshare_files(void) struct files_struct *files = current->files; int rc; - if(!files) - BUG(); + BUG_ON(!files); /* This can race but the race causes us to copy when we don't need to and drop the copy */