Skip to content

Commit

Permalink
BUG_ON() Conversion in fs/smbfs/
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Sesterhenn authored and Adrian Bunk committed Mar 31, 2006
1 parent 4b4d1cc commit 5df0d31
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions fs/smbfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,9 @@ smb_writepage(struct page *page, struct writeback_control *wbc)
unsigned offset = PAGE_CACHE_SIZE;
int err;

if (!mapping)
BUG();
BUG_ON(!mapping);
inode = mapping->host;
if (!inode)
BUG();
BUG_ON(!inode);

end_index = inode->i_size >> PAGE_CACHE_SHIFT;

Expand Down

0 comments on commit 5df0d31

Please sign in to comment.