Skip to content

Commit 0e48f51

Browse files
westeriaxboe
authored andcommitted
Revert "libata, freezer: avoid block device removal while system is frozen"
This reverts commit 85fbd72. The commit was added as a quick band-aid for a hang that happened when a block device was removed during system suspend. Now that bdi_wq is not freezable anymore the hang should not be possible and we can get rid of this hack by reverting it. Acked-by: Rafael J. Wysocki <[email protected]> Signed-off-by: Mika Westerberg <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent a2b90f1 commit 0e48f51

File tree

2 files changed

+0
-27
lines changed

2 files changed

+0
-27
lines changed

drivers/ata/libata-scsi.c

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4791,27 +4791,6 @@ void ata_scsi_hotplug(struct work_struct *work)
47914791
return;
47924792
}
47934793

4794-
/*
4795-
* XXX - UGLY HACK
4796-
*
4797-
* The block layer suspend/resume path is fundamentally broken due
4798-
* to freezable kthreads and workqueue and may deadlock if a block
4799-
* device gets removed while resume is in progress. I don't know
4800-
* what the solution is short of removing freezable kthreads and
4801-
* workqueues altogether.
4802-
*
4803-
* The following is an ugly hack to avoid kicking off device
4804-
* removal while freezer is active. This is a joke but does avoid
4805-
* this particular deadlock scenario.
4806-
*
4807-
* https://bugzilla.kernel.org/show_bug.cgi?id=62801
4808-
* http://marc.info/?l=linux-kernel&m=138695698516487
4809-
*/
4810-
#ifdef CONFIG_FREEZER
4811-
while (pm_freezing)
4812-
msleep(10);
4813-
#endif
4814-
48154794
DPRINTK("ENTER\n");
48164795
mutex_lock(&ap->scsi_scan_mutex);
48174796

kernel/freezer.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@ EXPORT_SYMBOL(system_freezing_cnt);
2222
bool pm_freezing;
2323
bool pm_nosig_freezing;
2424

25-
/*
26-
* Temporary export for the deadlock workaround in ata_scsi_hotplug().
27-
* Remove once the hack becomes unnecessary.
28-
*/
29-
EXPORT_SYMBOL_GPL(pm_freezing);
30-
3125
/* protects freezing and frozen transitions */
3226
static DEFINE_SPINLOCK(freezer_lock);
3327

0 commit comments

Comments
 (0)