diff options
author | Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com> | 2013-10-31 01:00:08 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-11-11 22:11:53 -0500 |
commit | fae7f21cece9a4c181a8d8131870c7247e153f65 (patch) | |
tree | d2c8052ead139f3e4bb4cb13c44dd59f32184d63 /fs/btrfs/file-item.c | |
parent | b19e684393752ec129a36924e6c270daf79676d6 (diff) |
btrfs: Use WARN_ON()'s return value in place of WARN_ON(1)
Use WARN_ON()'s return value in place of WARN_ON(1) for cleaner source
code that outputs a more descriptive warnings. Also fix the styling
warning of redundant braces that came up as a result of this fix.
Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
Reviewed-by: Zach Brown <zab@redhat.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/file-item.c')
-rw-r--r-- | fs/btrfs/file-item.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c index ae8a5139e0ee..6f3848860283 100644 --- a/fs/btrfs/file-item.c +++ b/fs/btrfs/file-item.c | |||
@@ -849,10 +849,8 @@ insert: | |||
849 | path->leave_spinning = 0; | 849 | path->leave_spinning = 0; |
850 | if (ret < 0) | 850 | if (ret < 0) |
851 | goto fail_unlock; | 851 | goto fail_unlock; |
852 | if (ret != 0) { | 852 | if (WARN_ON(ret != 0)) |
853 | WARN_ON(1); | ||
854 | goto fail_unlock; | 853 | goto fail_unlock; |
855 | } | ||
856 | leaf = path->nodes[0]; | 854 | leaf = path->nodes[0]; |
857 | csum: | 855 | csum: |
858 | item = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_csum_item); | 856 | item = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_csum_item); |