Loading block/blk-pm.c +9 −7 Original line number Diff line number Diff line Loading @@ -67,6 +67,10 @@ int blk_pre_runtime_suspend(struct request_queue *q) WARN_ON_ONCE(q->rpm_status != RPM_ACTIVE); spin_lock_irq(&q->queue_lock); q->rpm_status = RPM_SUSPENDING; spin_unlock_irq(&q->queue_lock); /* * Increase the pm_only counter before checking whether any * non-PM blk_queue_enter() calls are in progress to avoid that any Loading @@ -89,15 +93,13 @@ int blk_pre_runtime_suspend(struct request_queue *q) /* Switch q_usage_counter back to per-cpu mode. */ blk_mq_unfreeze_queue(q); if (ret < 0) { spin_lock_irq(&q->queue_lock); if (ret < 0) q->rpm_status = RPM_ACTIVE; pm_runtime_mark_last_busy(q->dev); else q->rpm_status = RPM_SUSPENDING; spin_unlock_irq(&q->queue_lock); if (ret) blk_clear_pm_only(q); } return ret; } Loading Loading
block/blk-pm.c +9 −7 Original line number Diff line number Diff line Loading @@ -67,6 +67,10 @@ int blk_pre_runtime_suspend(struct request_queue *q) WARN_ON_ONCE(q->rpm_status != RPM_ACTIVE); spin_lock_irq(&q->queue_lock); q->rpm_status = RPM_SUSPENDING; spin_unlock_irq(&q->queue_lock); /* * Increase the pm_only counter before checking whether any * non-PM blk_queue_enter() calls are in progress to avoid that any Loading @@ -89,15 +93,13 @@ int blk_pre_runtime_suspend(struct request_queue *q) /* Switch q_usage_counter back to per-cpu mode. */ blk_mq_unfreeze_queue(q); if (ret < 0) { spin_lock_irq(&q->queue_lock); if (ret < 0) q->rpm_status = RPM_ACTIVE; pm_runtime_mark_last_busy(q->dev); else q->rpm_status = RPM_SUSPENDING; spin_unlock_irq(&q->queue_lock); if (ret) blk_clear_pm_only(q); } return ret; } Loading