From: Eric Sesterhenn Date: Fri, 31 Mar 2006 23:16:26 +0000 (+0200) Subject: BUG_ON() Conversion in fs/smbfs/ X-Git-Tag: v2.6.17-rc1~10^2~37 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5df0d312413d920628f149421d7b0a3994684620;p=linux-2.6 BUG_ON() Conversion in fs/smbfs/ 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/fs/smbfs/file.c b/fs/smbfs/file.c index c56bd99a97..ed9a24d19d 100644 --- a/fs/smbfs/file.c +++ b/fs/smbfs/file.c @@ -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;