BUG_ON() Conversion in fs/smbfs/
authorEric Sesterhenn <snakebyte@gmx.de>
Fri, 31 Mar 2006 23:16:26 +0000 (01:16 +0200)
committerAdrian Bunk <bunk@stusta.de>
Fri, 31 Mar 2006 23:16:26 +0000 (01:16 +0200)
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>
fs/smbfs/file.c

index c56bd99a97018ca42b669a9ab5709ff5093ddbde..ed9a24d19d7d312ed5336c7d0873a059e3c804fb 100644 (file)
@@ -178,11 +178,9 @@ smb_writepage(struct page *page, struct writeback_control *wbc)
        unsigned offset = PAGE_CACHE_SIZE;
        int err;
 
-       if (!mapping)
-               BUG();
+       BUG_ON(!mapping);
        inode = mapping->host;
-       if (!inode)
-               BUG();
+       BUG_ON(!inode);
 
        end_index = inode->i_size >> PAGE_CACHE_SHIFT;