[SCSI] libfc: fix an issue of pending exch/es after i/f destroyed or rmmod fcoe
authorVasu Dev <vasu.dev@intel.com>
Tue, 3 Nov 2009 19:50:10 +0000 (11:50 -0800)
committerJames Bottomley <James.Bottomley@suse.de>
Fri, 4 Dec 2009 18:01:26 +0000 (12:01 -0600)
commit4ae1e19f251335a24ce6cd13f08b4af560ed8765
tree2a22a5722e3e6740f9dfad1d59f92cac7229c988
parent18fa11efc279c20af5eefff2bbe814ca067e51ae
[SCSI] libfc: fix an issue of pending exch/es after i/f destroyed or rmmod fcoe

All exches must be freed before its EM mempool destroyed in this
case but currently some exches could be still pending in their
scheduled delayed work after EM mempool is destroyed causing
this issue discussed and reported in this latest email thread:-

 http://www.open-fcoe.org/pipermail/devel/2009-October/004788.html

This patch fixes this issue by adding dedicated work queue thread
fc_exch_workqueue for exch delayed work and then flush this work
queue before destroying EM mempool.

The cancel_delayed_work_sync cannot be called during final
fc_exch_reset due to lport and exch locking ordering, so removes
related comment block not relevant any more with this patch.

Reported-by: Joe Eykholt <jeykholt@cisco.com>
Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/libfc/fc_exch.c