Re: [PATCH 2/2] scsi: don't use execute_in_process_context()

From: FUJITA Tomonori
Date: Fri Oct 22 2010 - 06:03:47 EST


On Tue, 19 Oct 2010 14:58:04 +0200
Tejun Heo <tj@xxxxxxxxxx> wrote:

> SCSI is the only subsystem which uses execute_in_process_context().
> With the recent workqueue updates, unconditionally using work wouldn't
> cause deadlocks around execution resources and the two places where
> SCSI uses them are cold paths where using work unconditionally
> wouldn't make any difference. Drop execute_in_process_context() and
> use work directly.
>
> * scsi_device->ew is replaced with release_work. scsi_target->ew is
> replaced with reap_work.
>
> * Both works are initialized with the respective release/reap function
> during device/target init. scsi_target_reap_usercontext() is moved
> upwards to avoid needing forward declaration.
>
> * scsi_alloc_target() now explicitly flushes the reap_work of the
> found dying target before putting it instead of depending on
> flush_scheduled_work().
>
> This is in preparation of deprecation of flush_scheduled_work() and
> execute_in_process_context().
>
> Signed-off-by: Tejun Heo <tj@xxxxxxxxxx>
> ---
> drivers/scsi/scsi_scan.c | 26 +++++++++++++-------------
> drivers/scsi/scsi_sysfs.c | 8 +++++---
> include/scsi/scsi_device.h | 4 ++--
> 3 files changed, 20 insertions(+), 18 deletions(-)

Looks fine to me.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/