mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 03:24:19 +02:00
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: Christoph Böhmwalder <christoph.boehmwalder@linbit.com> Link: https://lore.kernel.org/r/20221201110349.1282687-2-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
2e833c8c8c
commit
c3f8974198
|
|
@ -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)
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user