diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2012-11-03 16:30:18 -0400 |
---|---|---|
committer | Josef Bacik <jbacik@fusionio.com> | 2012-12-12 17:15:24 -0500 |
commit | 6c1500f22a7be3a24ad3dffcdbf04be3f676521b (patch) | |
tree | bef37d29a8bac05bcf594df26a3eb340141d165e /fs/btrfs/inode.c | |
parent | 31b1a2bd758f439fc945b3ac5899d890cb7e2dc6 (diff) |
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>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 6dca345fd1b6..e8733fab2739 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -1675,8 +1675,7 @@ static noinline int add_pending_csums(struct btrfs_trans_handle *trans, | |||
1675 | int btrfs_set_extent_delalloc(struct inode *inode, u64 start, u64 end, | 1675 | int btrfs_set_extent_delalloc(struct inode *inode, u64 start, u64 end, |
1676 | struct extent_state **cached_state) | 1676 | struct extent_state **cached_state) |
1677 | { | 1677 | { |
1678 | if ((end & (PAGE_CACHE_SIZE - 1)) == 0) | 1678 | WARN_ON((end & (PAGE_CACHE_SIZE - 1)) == 0); |
1679 | WARN_ON(1); | ||
1680 | return set_extent_delalloc(&BTRFS_I(inode)->io_tree, start, end, | 1679 | return set_extent_delalloc(&BTRFS_I(inode)->io_tree, start, end, |
1681 | cached_state, GFP_NOFS); | 1680 | cached_state, GFP_NOFS); |
1682 | } | 1681 | } |