History

vhost-scsi: drop flush after vhost_dev_cleanup

The flush after vhost_dev_cleanup is not needed because: 1. It doesn't do anything. vhost_dev_cleanup will stop the worker thread so the flush call will just return since the worker has not device. 2. It's not needed for the re-queue case. vhost_scsi_evt_handle_kick grabs the mutex and if the backend is NULL will return without queueing a work. vhost_scsi_clear_endpoint will set the backend to NULL under the vq->mutex then drops the mutex and does a flush. So we know when vhost_scsi_clear_endpoint has dropped the mutex after clearing the backend no evt related work will be able to requeue. The flush would then make sure any queued evts are run and return.

Mike Christie committed 4 years ago

Commit c3d284c1 parent 15538ba1 file · +0 −2Browse files

Unified · Split

drivers/vhost/scsi.c+0−2
@@ -1827,8 +1827,6 @@ static int vhost_scsi_release(struct inode *inode, struct file *f) · 1826 unmodified lines
18271827 vhost_scsi_clear_endpoint(vs, &t);
18281828 vhost_dev_stop(&vs->dev);
18291829 vhost_dev_cleanup(&vs->dev);
1830− /* Jobs can re-queue themselves in evt kick handler. Do extra flush. */
1831− vhost_scsi_flush(vs);
18321830 kfree(vs->dev.vqs);
18331831 kvfree(vs);
18341832 return 0;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t