summaryrefslogtreecommitdiffstats
path: root/fs/ext2/dir.c
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-03-26 18:27:41 +0200
committerAdrian Bunk <bunk@stusta.de>2006-03-26 18:27:41 +0200
commit309be53da60dc24b73f3f0bceab8f0707c05371f (patch)
tree4e2c96510250f22017c39b214083d3e1bceb9889 /fs/ext2/dir.c
parent4d4ef9abe34a472fbfc9ab75cfde0d58bc342c44 (diff)
downloadblackbird-op-linux-309be53da60dc24b73f3f0bceab8f0707c05371f.tar.gz
blackbird-op-linux-309be53da60dc24b73f3f0bceab8f0707c05371f.zip
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>
Diffstat (limited to 'fs/ext2/dir.c')
-rw-r--r--fs/ext2/dir.c6
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,
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;
OpenPOWER on IntegriCloud