@@ -2455,6 +2455,7 @@ static u64 adjust_inuse_and_calc_cost(struct ioc_gq *iocg, u64 vtime,
2455
2455
u32 hwi , adj_step ;
2456
2456
s64 margin ;
2457
2457
u64 cost , new_inuse ;
2458
+ unsigned long flags ;
2458
2459
2459
2460
current_hweight (iocg , NULL , & hwi );
2460
2461
old_hwi = hwi ;
@@ -2473,11 +2474,11 @@ static u64 adjust_inuse_and_calc_cost(struct ioc_gq *iocg, u64 vtime,
2473
2474
iocg -> inuse == iocg -> active )
2474
2475
return cost ;
2475
2476
2476
- spin_lock_irq (& ioc -> lock );
2477
+ spin_lock_irqsave (& ioc -> lock , flags );
2477
2478
2478
2479
/* we own inuse only when @iocg is in the normal active state */
2479
2480
if (iocg -> abs_vdebt || list_empty (& iocg -> active_list )) {
2480
- spin_unlock_irq (& ioc -> lock );
2481
+ spin_unlock_irqrestore (& ioc -> lock , flags );
2481
2482
return cost ;
2482
2483
}
2483
2484
@@ -2498,7 +2499,7 @@ static u64 adjust_inuse_and_calc_cost(struct ioc_gq *iocg, u64 vtime,
2498
2499
} while (time_after64 (vtime + cost , now -> vnow ) &&
2499
2500
iocg -> inuse != iocg -> active );
2500
2501
2501
- spin_unlock_irq (& ioc -> lock );
2502
+ spin_unlock_irqrestore (& ioc -> lock , flags );
2502
2503
2503
2504
TRACE_IOCG_PATH (inuse_adjust , iocg , now ,
2504
2505
old_inuse , iocg -> inuse , old_hwi , hwi );
0 commit comments