diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-03-26 18:24:46 +0200 |
---|---|---|
committer | Adrian Bunk <bunk@stusta.de> | 2006-03-26 18:24:46 +0200 |
commit | e827f92355e1eeec2d227d3bd3350d04042a011e (patch) | |
tree | 87d1b735d59edcae4044b46157cb72de1a32af54 /fs/buffer.c | |
parent | fddaaae16ba4d9f4d392a9ef94616d9d22485571 (diff) | |
download | linux-3.10-e827f92355e1eeec2d227d3bd3350d04042a011e.tar.gz linux-3.10-e827f92355e1eeec2d227d3bd3350d04042a011e.tar.bz2 linux-3.10-e827f92355e1eeec2d227d3bd3350d04042a011e.zip |
BUG_ON() Conversion in fs/buffer.c
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>
Diffstat (limited to 'fs/buffer.c')
-rw-r--r-- | fs/buffer.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index 3b3ab528192..4342ab0ad99 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -796,8 +796,7 @@ void mark_buffer_dirty_inode(struct buffer_head *bh, struct inode *inode) if (!mapping->assoc_mapping) { mapping->assoc_mapping = buffer_mapping; } else { - if (mapping->assoc_mapping != buffer_mapping) - BUG(); + BUG_ON(mapping->assoc_mapping != buffer_mapping); } if (list_empty(&bh->b_assoc_buffers)) { spin_lock(&buffer_mapping->private_lock); @@ -1114,8 +1113,7 @@ grow_dev_page(struct block_device *bdev, sector_t block, if (!page) return NULL; - if (!PageLocked(page)) - BUG(); + BUG_ON(!PageLocked(page)); if (page_has_buffers(page)) { bh = page_buffers(page); @@ -1522,8 +1520,7 @@ void set_bh_page(struct buffer_head *bh, struct page *page, unsigned long offset) { bh->b_page = page; - if (offset >= PAGE_SIZE) - BUG(); + BUG_ON(offset >= PAGE_SIZE); if (PageHighMem(page)) /* * This catches illegal uses and preserves the offset: |