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>
This commit is contained in:

committed by
Chris Mason

parent
b19e684393
commit
fae7f21cec
@@ -78,10 +78,8 @@ again:
|
||||
btrfs_transaction_in_commit(fs_info)) {
|
||||
leaf = path->nodes[0];
|
||||
|
||||
if (btrfs_header_nritems(leaf) == 0) {
|
||||
WARN_ON(1);
|
||||
if (WARN_ON(btrfs_header_nritems(leaf) == 0))
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* Save the key so we can advances forward
|
||||
|
Reference in New Issue
Block a user