mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
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 <snakebyte@gmx.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
This commit is contained in:
parent
4d4ef9abe3
commit
309be53da6
1 changed files with 2 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue