@@ -2448,6 +2448,7 @@ static u64 adjust_inuse_and_calc_cost(struct ioc_gq *iocg, u64 vtime,
2448
2448
u32 hwi , adj_step ;
2449
2449
s64 margin ;
2450
2450
u64 cost , new_inuse ;
2451
+ unsigned long flags ;
2451
2452
2452
2453
current_hweight (iocg , NULL , & hwi );
2453
2454
old_hwi = hwi ;
@@ -2466,11 +2467,11 @@ static u64 adjust_inuse_and_calc_cost(struct ioc_gq *iocg, u64 vtime,
2466
2467
iocg -> inuse == iocg -> active )
2467
2468
return cost ;
2468
2469
2469
- spin_lock_irq (& ioc -> lock );
2470
+ spin_lock_irqsave (& ioc -> lock , flags );
2470
2471
2471
2472
/* we own inuse only when @iocg is in the normal active state */
2472
2473
if (iocg -> abs_vdebt || list_empty (& iocg -> active_list )) {
2473
- spin_unlock_irq (& ioc -> lock );
2474
+ spin_unlock_irqrestore (& ioc -> lock , flags );
2474
2475
return cost ;
2475
2476
}
2476
2477
@@ -2491,7 +2492,7 @@ static u64 adjust_inuse_and_calc_cost(struct ioc_gq *iocg, u64 vtime,
2491
2492
} while (time_after64 (vtime + cost , now -> vnow ) &&
2492
2493
iocg -> inuse != iocg -> active );
2493
2494
2494
- spin_unlock_irq (& ioc -> lock );
2495
+ spin_unlock_irqrestore (& ioc -> lock , flags );
2495
2496
2496
2497
TRACE_IOCG_PATH (inuse_adjust , iocg , now ,
2497
2498
old_inuse , iocg -> inuse , old_hwi , hwi );
0 commit comments