diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-03-26 11:27:41 -0500 |
---|---|---|
committer | Adrian Bunk <bunk@stusta.de> | 2006-03-26 11:27:41 -0500 |
commit | 309be53da60dc24b73f3f0bceab8f0707c05371f (patch) | |
tree | 4e2c96510250f22017c39b214083d3e1bceb9889 | |
parent | 4d4ef9abe34a472fbfc9ab75cfde0d58bc342c44 (diff) |
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>
-rw-r--r-- | fs/ext2/dir.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/ext2/dir.c b/fs/ext2/dir.c index b3dbd716cd3a..0165388c425c 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, | |||
416 | 416 | ||
417 | lock_page(page); | 417 | lock_page(page); |
418 | err = page->mapping->a_ops->prepare_write(NULL, page, from, to); | 418 | err = page->mapping->a_ops->prepare_write(NULL, page, from, to); |
419 | if (err) | 419 | BUG_ON(err); |
420 | BUG(); | ||
421 | de->inode = cpu_to_le32(inode->i_ino); | 420 | de->inode = cpu_to_le32(inode->i_ino); |
422 | ext2_set_de_type (de, inode); | 421 | ext2_set_de_type (de, inode); |
423 | err = ext2_commit_chunk(page, from, to); | 422 | 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 | from = (char*)pde - (char*)page_address(page); | 553 | from = (char*)pde - (char*)page_address(page); |
555 | lock_page(page); | 554 | lock_page(page); |
556 | err = mapping->a_ops->prepare_write(NULL, page, from, to); | 555 | err = mapping->a_ops->prepare_write(NULL, page, from, to); |
557 | if (err) | 556 | BUG_ON(err); |
558 | BUG(); | ||
559 | if (pde) | 557 | if (pde) |
560 | pde->rec_len = cpu_to_le16(to-from); | 558 | pde->rec_len = cpu_to_le16(to-from); |
561 | dir->inode = 0; | 559 | dir->inode = 0; |