scsi: libsas: use flush_workqueue to process disco events synchronously
authorJason Yan <yanaijie@huawei.com>
Fri, 8 Dec 2017 09:42:08 +0000 (17:42 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 9 Jan 2018 02:59:28 +0000 (21:59 -0500)
commit517e5153d242cb2dd0a1150d2a7bd6788d501ca9
treeb9ad887995dd964ab688e52afe3b9b50476b4f49
parent93bdbd06b1644ac15aa152e91faefed86cc04937
scsi: libsas: use flush_workqueue to process disco events synchronously

Now we are processing sas event and discover event in different
workqueues.  It's safe to wait the discover event done in the sas event
work. Use flush_workqueue() to insure the disco and revalidate events
processed synchronously so that the whole discover and revalidate
process will not be interrupted by other events.

Signed-off-by: Jason Yan <yanaijie@huawei.com>
CC: John Garry <john.garry@huawei.com>
CC: Johannes Thumshirn <jthumshirn@suse.de>
CC: Ewan Milne <emilne@redhat.com>
CC: Christoph Hellwig <hch@lst.de>
CC: Tomas Henzl <thenzl@redhat.com>
CC: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/libsas/sas_port.c