@@ -2455,6 +2455,7 @@ static u64 adjust_inuse_and_calc_cost(struct ioc_gq *iocg, u64 vtime,
24552455	u32  hwi , adj_step ;
24562456	s64  margin ;
24572457	u64  cost , new_inuse ;
2458+ 	unsigned long  flags ;
24582459
24592460	current_hweight (iocg , NULL , & hwi );
24602461	old_hwi  =  hwi ;
@@ -2473,11 +2474,11 @@ static u64 adjust_inuse_and_calc_cost(struct ioc_gq *iocg, u64 vtime,
24732474	    iocg -> inuse  ==  iocg -> active )
24742475		return  cost ;
24752476
2476- 	spin_lock_irq (& ioc -> lock );
2477+ 	spin_lock_irqsave (& ioc -> lock ,  flags );
24772478
24782479	/* we own inuse only when @iocg is in the normal active state */ 
24792480	if  (iocg -> abs_vdebt  ||  list_empty (& iocg -> active_list )) {
2480- 		spin_unlock_irq (& ioc -> lock );
2481+ 		spin_unlock_irqrestore (& ioc -> lock ,  flags );
24812482		return  cost ;
24822483	}
24832484
@@ -2498,7 +2499,7 @@ static u64 adjust_inuse_and_calc_cost(struct ioc_gq *iocg, u64 vtime,
24982499	} while  (time_after64 (vtime  +  cost , now -> vnow ) && 
24992500		 iocg -> inuse  !=  iocg -> active );
25002501
2501- 	spin_unlock_irq (& ioc -> lock );
2502+ 	spin_unlock_irqrestore (& ioc -> lock ,  flags );
25022503
25032504	TRACE_IOCG_PATH (inuse_adjust , iocg , now ,
25042505			old_inuse , iocg -> inuse , old_hwi , hwi );
0 commit comments