Commit aa0689b3 authored by Roland Dreier's avatar Roland Dreier Committed by Greg Kroah-Hartman

Revert "driver core: synchronize device shutdown"

This reverts commit 401097ea.  The
original changelog said:

    A patch series to make .shutdown execute asynchronously.  Some drivers's
    shutdown can take a lot of time.  The patches can help save some shutdown
    time.  The patches use Arjan's async API.

    This patch:

    synchronize all tasks submitted by .shutdown

However, I'm not able to find any evidence that any other patches from
this series were applied, nor am I able to find any async tasks that are
scheduled in a .shutdown context.

On the other hand, we see occasional hangs on shutdown that appear to be
caused by the async_synchronize_full() in device_shutdown() waiting
forever for the async probing in sd if a SCSI disk shows up at just the
wrong time — the system starts the probe, but begins shutting down and
tears down too much of the SCSI driver to finish the probe.

If we had any async shutdown tasks, I guess the right fix would be to
create a "shutdown" async domain and have device_shutdown() only wait
for that domain.  But since there apparently are no async shutdown
tasks, we can just revert the waiting.
Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 88391d49
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include <linux/genhd.h> #include <linux/genhd.h>
#include <linux/kallsyms.h> #include <linux/kallsyms.h>
#include <linux/mutex.h> #include <linux/mutex.h>
#include <linux/async.h>
#include <linux/pm_runtime.h> #include <linux/pm_runtime.h>
#include <linux/netdevice.h> #include <linux/netdevice.h>
#include <linux/sysfs.h> #include <linux/sysfs.h>
...@@ -1987,7 +1986,6 @@ void device_shutdown(void) ...@@ -1987,7 +1986,6 @@ void device_shutdown(void)
spin_lock(&devices_kset->list_lock); spin_lock(&devices_kset->list_lock);
} }
spin_unlock(&devices_kset->list_lock); spin_unlock(&devices_kset->list_lock);
async_synchronize_full();
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment