[SCSI] libfc: fix an issue of pending exch/es after i/f destroyed or rmmod fcoe
[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 <58ecd23b42b4d3dfa0c5ed4c55abaf4238ca786e@cisco.com>
Signed-off-by: Vasu Dev <b689df8ee0e5a49e90c823e09bfde2c0a9ddc420@intel.com>
Signed-off-by: Robert Love <ae32029cc3b561e3768d1db8669e99f5bdf25e4b@intel.com>
Signed-off-by: James Bottomley <407b36959ca09543ccda8f8e06721c791bc53435@suse.de>

TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas