@@ -2448,6 +2448,7 @@ static u64 adjust_inuse_and_calc_cost(struct ioc_gq *iocg, u64 vtime,
24482448 u32 hwi , adj_step ;
24492449 s64 margin ;
24502450 u64 cost , new_inuse ;
2451+ unsigned long flags ;
24512452
24522453 current_hweight (iocg , NULL , & hwi );
24532454 old_hwi = hwi ;
@@ -2466,11 +2467,11 @@ static u64 adjust_inuse_and_calc_cost(struct ioc_gq *iocg, u64 vtime,
24662467 iocg -> inuse == iocg -> active )
24672468 return cost ;
24682469
2469- spin_lock_irq (& ioc -> lock );
2470+ spin_lock_irqsave (& ioc -> lock , flags );
24702471
24712472 /* we own inuse only when @iocg is in the normal active state */
24722473 if (iocg -> abs_vdebt || list_empty (& iocg -> active_list )) {
2473- spin_unlock_irq (& ioc -> lock );
2474+ spin_unlock_irqrestore (& ioc -> lock , flags );
24742475 return cost ;
24752476 }
24762477
@@ -2491,7 +2492,7 @@ static u64 adjust_inuse_and_calc_cost(struct ioc_gq *iocg, u64 vtime,
24912492 } while (time_after64 (vtime + cost , now -> vnow ) &&
24922493 iocg -> inuse != iocg -> active );
24932494
2494- spin_unlock_irq (& ioc -> lock );
2495+ spin_unlock_irqrestore (& ioc -> lock , flags );
24952496
24962497 TRACE_IOCG_PATH (inuse_adjust , iocg , now ,
24972498 old_inuse , iocg -> inuse , old_hwi , hwi );
0 commit comments