From: Eric Sesterhenn Date: Sun, 26 Mar 2006 16:27:41 +0000 (+0200) Subject: BUG_ON() Conversion in fs/ext2/ X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=309be53da60dc24b73f3f0bceab8f0707c05371f;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git BUG_ON() Conversion in fs/ext2/ 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/ext2/dir.c b/fs/ext2/dir.c index b3dbd716cd3..0165388c425 100644 --- a/fs/ext2/dir.c +++ b/fs/ext2/dir.c @@ -416,8 +416,7 @@ void ext2_set_link(struct inode *dir, struct ext2_dir_entry_2 *de, lock_page(page); err = page->mapping->a_ops->prepare_write(NULL, page, from, to); - if (err) - BUG(); + BUG_ON(err); de->inode = cpu_to_le32(inode->i_ino); ext2_set_de_type (de, inode); err = ext2_commit_chunk(page, from, to); @@ -554,8 +553,7 @@ int ext2_delete_entry (struct ext2_dir_entry_2 * dir, struct page * page ) from = (char*)pde - (char*)page_address(page); lock_page(page); err = mapping->a_ops->prepare_write(NULL, page, from, to); - if (err) - BUG(); + BUG_ON(err); if (pde) pde->rec_len = cpu_to_le16(to-from); dir->inode = 0;