[SCSI] libfcoe: fcoe_ctlr_destroy use cancel_work_sync instead of flush_work
authorChris Leech <christopher.leech@intel.com>
Tue, 25 Aug 2009 20:59:08 +0000 (13:59 -0700)
committerJames Bottomley <James.Bottomley@suse.de>
Thu, 10 Sep 2009 17:07:28 +0000 (12:07 -0500)
commita4b7cfaee487caef913be978dce60896fe741268
tree42de6baeef3390b94b1cb99a05cc4c44d94cefce
parent05cc7390735c49357b9ae67bf97f1c1579547f5b
[SCSI] libfcoe: fcoe_ctlr_destroy use cancel_work_sync instead of flush_work

Use cancel_work_sync() in place of flush_work(), so that
fcoe_ctlr_destroy() can be called from a workqueue.

Also, purge the receive queue after the recv_work has been cancled because
if recv_work isn't run it's not guaranteed to be empty now.

Signed-off-by: Chris Leech <christopher.leech@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/fcoe/libfcoe.c