BUG_ON() Conversion in fs/buffer.c
Subsystems (2)
PATCH 2/8 BUG_ON() Conversion in fs/buffer.c
hi,
this changes if() BUG(); constructs to BUG_ON() which is cleaner and can better optimized away
Signed-off-by Eric Sesterhenn <[email protected]>
fs/buffer.c renamed from fs/buffer.c.orig +3 -6
@@ -801,8 +801,7 @@ void mark_buffer_dirty_inode(struct buffif (!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);
@@ -1118,8 +1117,7 @@ grow_dev_page(struct block_device *bdev,if (!page)return NULL ; -if (!PageLocked (page)) -BUG (); +BUG_ON (!PageLocked (page));if (page_has_buffers (page)) { bh =page_buffers (page);
@@ -1526,8 +1524,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:
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors