Commit d6735bfc authored by Eric Sesterhenn's avatar Eric Sesterhenn Committed by Adrian Bunk

BUG_ON() Conversion in fs/sysv/

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 b7542f8c
...@@ -253,8 +253,7 @@ int sysv_delete_entry(struct sysv_dir_entry *de, struct page *page) ...@@ -253,8 +253,7 @@ int sysv_delete_entry(struct sysv_dir_entry *de, struct page *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();
de->inode = 0; de->inode = 0;
err = dir_commit_chunk(page, from, to); err = dir_commit_chunk(page, from, to);
dir_put_page(page); dir_put_page(page);
...@@ -353,8 +352,7 @@ void sysv_set_link(struct sysv_dir_entry *de, struct page *page, ...@@ -353,8 +352,7 @@ void sysv_set_link(struct sysv_dir_entry *de, struct page *page,
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_fs16(SYSV_SB(inode->i_sb), inode->i_ino); de->inode = cpu_to_fs16(SYSV_SB(inode->i_sb), inode->i_ino);
err = dir_commit_chunk(page, from, to); err = dir_commit_chunk(page, from, to);
dir_put_page(page); dir_put_page(page);
......
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