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

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.com


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 2e833c8c
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -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 { \
#define D_ASSERT(x, exp)							\
	do {									\
		if (!(exp))							\
		drbd_err(device, "ASSERT( " #exp " ) in %s:%d\n", __FILE__, __LINE__); \
			drbd_err(x, "ASSERTION %s FAILED in %s\n",		\
				 #exp, __func__);				\
	} while (0)

/**