summaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_actlog.c
diff options
context:
space:
mode:
authorChristoph Böhmwalder <christoph.boehmwalder@linbit.com>2022-12-01 12:03:49 +0100
committerJens Axboe <axboe@kernel.dk>2022-12-01 19:33:49 +0100
commite3fa02d7d420c7cfb7077cc6eeb62c886ba5ff39 (patch)
treef07f3aa22891ae6f9045534d0a4693dcd31eead9 /drivers/block/drbd/drbd_actlog.c
parentdrbd: introduce dynamic debug (diff)
downloadlinux-e3fa02d7d420c7cfb7077cc6eeb62c886ba5ff39.tar.xz
linux-e3fa02d7d420c7cfb7077cc6eeb62c886ba5ff39.zip
drbd: introduce drbd_ratelimit()
Use call site specific ratelimit instead of one single static global. Also ratelimit ASSERTION messages generated by expect(). Originally-from: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Christoph Böhmwalder <christoph.boehmwalder@linbit.com> Link: https://lore.kernel.org/r/20221201110349.1282687-5-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/drbd/drbd_actlog.c')
-rw-r--r--drivers/block/drbd/drbd_actlog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_actlog.c b/drivers/block/drbd/drbd_actlog.c
index 5db147f3c02d..87d93012289f 100644
--- a/drivers/block/drbd/drbd_actlog.c
+++ b/drivers/block/drbd/drbd_actlog.c
@@ -1143,7 +1143,7 @@ void drbd_rs_complete_io(struct drbd_device *device, sector_t sector)
bm_ext = e ? lc_entry(e, struct bm_extent, lce) : NULL;
if (!bm_ext) {
spin_unlock_irqrestore(&device->al_lock, flags);
- if (__ratelimit(&drbd_ratelimit_state))
+ if (drbd_ratelimit())
drbd_err(device, "drbd_rs_complete_io() called, but extent not found\n");
return;
}