Skip to content

Commit

Permalink
lightnvm: warn if irqs are disabled in lock laddr
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Matias Bjørling <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Javier González authored and axboe committed Feb 4, 2016
1 parent 16c6d04 commit bba7f40
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/lightnvm/rrpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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))) {
Expand Down

0 comments on commit bba7f40

Please sign in to comment.