[PATCH 21/23] ext4: use ASSERT_FAIL()/ASSERT_WARN() to cleanup some code

Chunguang Xu
2020-08-27T10:15:08Z

fs/ext4/mballoc.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index c0a331e..99976e6 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -591,15 +591,7 @@ static inline void mb_group_bb_bitmap_free(struct ext4_group_info *grp)

#ifdef AGGRESSIVE_CHECK

-#define MB_CHECK_ASSERT(assert) \
-do { \
- if (!(assert)) { \
- printk(KERN_EMERG \
- "Assertion failure in %s() at %s:%d: \"%s\"\n", \
- function, file, line, # assert); \
- BUG(); \
- } \
-} while (0)
+#define MB_CHECK_ASSERT(assert) ASSERT_FAIL(assert)

static int __mb_check_buddy(struct ext4_buddy *e4b, char *file,
const char *function, int line)
--
1.8.3.1