fs/btrfs: drop if around WARN_ON
Just use WARN_ON rather than an if containing only WARN_ON(1). A simplified version of the semantic patch that makes this transformation is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression e; @@ - if (e) WARN_ON(1); + WARN_ON(e); // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Reviewed-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
This commit is contained in:
committed by
Josef Bacik
parent
31b1a2bd75
commit
6c1500f22a
@ -1675,8 +1675,7 @@ static noinline int add_pending_csums(struct btrfs_trans_handle *trans,
|
||||
int btrfs_set_extent_delalloc(struct inode *inode, u64 start, u64 end,
|
||||
struct extent_state **cached_state)
|
||||
{
|
||||
if ((end & (PAGE_CACHE_SIZE - 1)) == 0)
|
||||
WARN_ON(1);
|
||||
WARN_ON((end & (PAGE_CACHE_SIZE - 1)) == 0);
|
||||
return set_extent_delalloc(&BTRFS_I(inode)->io_tree, start, end,
|
||||
cached_state, GFP_NOFS);
|
||||
}
|
||||
|
Reference in New Issue
Block a user