diff options
author | Qu Wenruo <quwenruo@cn.fujitsu.com> | 2017-01-19 12:00:03 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-01-25 09:48:13 +0100 |
commit | 5826f1e9ff5d8e3df8d48a09f6b95a4ef4309950 (patch) | |
tree | 0333d3b5a8bfcc570fa93a464f3478e81dabcb00 /tests | |
parent | 795cfb9b1735c09f108c91f93b578203cd865163 (diff) |
btrfs-progs: Fix disable backtrace assert error
Due to commit 00e769d04c2c83029d6c71(btrfs-progs: Correct value printed
by assertions/BUG_ON/WARN_ON), which changed the assert_trace()
parameter, the condition passed to assert/WARN_ON/BUG_ON are logical
notted for backtrace enabled and disabled case.
Such behavior makes us easier to pass value wrong, and in fact it did
cause us to pass wrong condition for ASSERT().
Instead of passing different conditions for ASSERT/WARN_ON/BUG_ON()
manually, this patch will use ASSERT() to implement the resting
ASSERT/WARN_ON/BUG() for disable backtrace case, and use assert_trace()
to implement ASSERT() and BUG_ON(), to allow them to print correct
value.
Also, move WARN_ON() out of the ifdef branch, as it's completely the
same for both branches.
Cc: Goldwyn Rodrigues <rgoldwyn@suse.de>
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions