summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/backref.c
diff options
context:
space:
mode:
authorDulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>2013-10-31 06:00:08 +0100
committerChris Mason <chris.mason@fusionio.com>2013-11-12 04:11:53 +0100
commitfae7f21cece9a4c181a8d8131870c7247e153f65 (patch)
treed2c8052ead139f3e4bb4cb13c44dd59f32184d63 /fs/btrfs/backref.c
parentbtrfs: Remove redundant local zero structure (diff)
downloadlinux-fae7f21cece9a4c181a8d8131870c7247e153f65.tar.xz
linux-fae7f21cece9a4c181a8d8131870c7247e153f65.zip
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/backref.c')
-rw-r--r--fs/btrfs/backref.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
index 30d24cfb45d4..3775947429b2 100644
--- a/fs/btrfs/backref.c
+++ b/fs/btrfs/backref.c
@@ -326,8 +326,7 @@ static int __resolve_indirect_ref(struct btrfs_fs_info *fs_info,
eb = path->nodes[level];
while (!eb) {
- if (!level) {
- WARN_ON(1);
+ if (WARN_ON(!level)) {
ret = 1;
goto out;
}