Commit 309be53d authored by Eric Sesterhenn's avatar Eric Sesterhenn Committed by Adrian Bunk

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: default avatarEric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
parent 4d4ef9ab
...@@ -416,8 +416,7 @@ void ext2_set_link(struct inode *dir, struct ext2_dir_entry_2 *de, ...@@ -416,8 +416,7 @@ void ext2_set_link(struct inode *dir, struct ext2_dir_entry_2 *de,
lock_page(page); lock_page(page);
err = page->mapping->a_ops->prepare_write(NULL, page, from, to); err = page->mapping->a_ops->prepare_write(NULL, page, from, to);
if (err) BUG_ON(err);
BUG();
de->inode = cpu_to_le32(inode->i_ino); de->inode = cpu_to_le32(inode->i_ino);
ext2_set_de_type (de, inode); ext2_set_de_type (de, inode);
err = ext2_commit_chunk(page, from, to); err = ext2_commit_chunk(page, from, to);
...@@ -554,8 +553,7 @@ int ext2_delete_entry (struct ext2_dir_entry_2 * dir, struct page * page ) ...@@ -554,8 +553,7 @@ int ext2_delete_entry (struct ext2_dir_entry_2 * dir, struct page * page )
from = (char*)pde - (char*)page_address(page); from = (char*)pde - (char*)page_address(page);
lock_page(page); lock_page(page);
err = mapping->a_ops->prepare_write(NULL, page, from, to); err = mapping->a_ops->prepare_write(NULL, page, from, to);
if (err) BUG_ON(err);
BUG();
if (pde) if (pde)
pde->rec_len = cpu_to_le16(to-from); pde->rec_len = cpu_to_le16(to-from);
dir->inode = 0; dir->inode = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment