BUG_ON() Conversion in fs/fcntl.c
authorEric Sesterhenn <snakebyte@gmx.de>
Sun, 2 Apr 2006 11:37:19 +0000 (13:37 +0200)
committerAdrian Bunk <bunk@stusta.de>
Sun, 2 Apr 2006 11:37:19 +0000 (13:37 +0200)
this changes if() BUG(); constructs to BUG_ON() which is
cleaner and can better optimized away

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
fs/fcntl.c

index 2a2479196f965b1157a9404eb6d69397a1f6b1fd..d35cbc6bc11206b528a47672678d4337c933ecec 100644 (file)
@@ -453,8 +453,7 @@ static void send_sigio_to_task(struct task_struct *p,
                        /* Make sure we are called with one of the POLL_*
                           reasons, otherwise we could leak kernel stack into
                           userspace.  */
-                       if ((reason & __SI_MASK) != __SI_POLL)
-                               BUG();
+                       BUG_ON((reason & __SI_MASK) != __SI_POLL);
                        if (reason - POLL_IN >= NSIGPOLL)
                                si.si_band  = ~0L;
                        else