瀏覽代碼

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 <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Eric Sesterhenn 19 年之前
父節點
當前提交
910dea7fdd
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      kernel/fork.c

+ 1 - 2
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 */