Skip to content

Commit

Permalink
BUG_ON() Conversion in kernel/fork.c
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: Adrian Bunk <bunk@stusta.de>
  • Loading branch information
Eric Sesterhenn authored and Adrian Bunk committed Mar 26, 2006
1 parent 27315c9 commit 910dea7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions kernel/fork.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 910dea7

Please sign in to comment.