summaryrefslogtreecommitdiffstats
path: root/drivers/lightnvm
diff options
context:
space:
mode:
authorJavier González <jg@lightnvm.io>2016-02-04 15:13:24 +0100
committerJens Axboe <axboe@fb.com>2016-02-04 09:19:45 -0700
commitbba7f40a029c1e2966146e3a021b3deaf5639904 (patch)
tree2fdfd5e29ad989ddb260c18f9e6d4fbc42100c4d /drivers/lightnvm
parent16c6d048d7b74249a4387700887e8adb13028866 (diff)
downloadop-kernel-dev-bba7f40a029c1e2966146e3a021b3deaf5639904.zip
op-kernel-dev-bba7f40a029c1e2966146e3a021b3deaf5639904.tar.gz
lightnvm: warn if irqs are disabled in lock laddr
Add a warning if irqs are disabled when locking a new address in rrpc. The typical path to a new request does not disable irqs, but this is not guaranteed in the future. Signed-off-by: Javier González <javier@cnexlabs.com> Signed-off-by: Matias Bjørling <m@bjorling.me> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/lightnvm')
-rw-r--r--drivers/lightnvm/rrpc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/lightnvm/rrpc.h b/drivers/lightnvm/rrpc.h
index ef13ac7..b0277cb 100644
--- a/drivers/lightnvm/rrpc.h
+++ b/drivers/lightnvm/rrpc.h
@@ -184,6 +184,8 @@ static int __rrpc_lock_laddr(struct rrpc *rrpc, sector_t laddr,
sector_t laddr_end = laddr + pages - 1;
struct rrpc_inflight_rq *rtmp;
+ WARN_ON(irqs_disabled());
+
spin_lock_irq(&rrpc->inflights.lock);
list_for_each_entry(rtmp, &rrpc->inflights.reqs, list) {
if (unlikely(request_intersects(rtmp, laddr, laddr_end))) {
OpenPOWER on IntegriCloud