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>
This commit is contained in:
parent
16c6d048d7
commit
bba7f40a02
|
@ -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))) {
|
||||
|
|
Loading…
Reference in New Issue