Merge tag 'wq-for-6.5-cleanup-ordered' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git] / block / blk-iocost.c
index 285ced3..6084a95 100644 (file)
@@ -2455,6 +2455,7 @@ static u64 adjust_inuse_and_calc_cost(struct ioc_gq *iocg, u64 vtime,
        u32 hwi, adj_step;
        s64 margin;
        u64 cost, new_inuse;
+       unsigned long flags;
 
        current_hweight(iocg, NULL, &hwi);
        old_hwi = hwi;
@@ -2473,11 +2474,11 @@ static u64 adjust_inuse_and_calc_cost(struct ioc_gq *iocg, u64 vtime,
            iocg->inuse == iocg->active)
                return cost;
 
-       spin_lock_irq(&ioc->lock);
+       spin_lock_irqsave(&ioc->lock, flags);
 
        /* we own inuse only when @iocg is in the normal active state */
        if (iocg->abs_vdebt || list_empty(&iocg->active_list)) {
-               spin_unlock_irq(&ioc->lock);
+               spin_unlock_irqrestore(&ioc->lock, flags);
                return cost;
        }
 
@@ -2498,7 +2499,7 @@ static u64 adjust_inuse_and_calc_cost(struct ioc_gq *iocg, u64 vtime,
        } while (time_after64(vtime + cost, now->vnow) &&
                 iocg->inuse != iocg->active);
 
-       spin_unlock_irq(&ioc->lock);
+       spin_unlock_irqrestore(&ioc->lock, flags);
 
        TRACE_IOCG_PATH(inuse_adjust, iocg, now,
                        old_inuse, iocg->inuse, old_hwi, hwi);