Commit c3f89741 authored by Christoph Böhmwalder's avatar Christoph Böhmwalder Committed by Jens Axboe

drbd: unify how failed assertions are logged

Unify how failed assertions from D_ASSERT() and expect() are logged.

Originally-from: Andreas Gruenbacher <agruen@linbit.com>
Signed-off-by: default avatarChristoph Böhmwalder <christoph.boehmwalder@linbit.com>
Link: https://lore.kernel.org/r/20221201110349.1282687-2-christoph.boehmwalder@linbit.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 2e833c8c
......@@ -122,9 +122,11 @@ void drbd_printk_with_wrong_object_type(void);
#define dynamic_drbd_dbg(device, fmt, args...) \
dynamic_dev_dbg(disk_to_dev(device->vdisk), fmt, ## args)
#define D_ASSERT(device, exp) do { \
if (!(exp)) \
drbd_err(device, "ASSERT( " #exp " ) in %s:%d\n", __FILE__, __LINE__); \
#define D_ASSERT(x, exp) \
do { \
if (!(exp)) \
drbd_err(x, "ASSERTION %s FAILED in %s\n", \
#exp, __func__); \
} while (0)
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment