diff options
-rw-r--r-- | drivers/vhost/net.c | 2 | ||||
-rw-r--r-- | drivers/vhost/scsi.c | 2 | ||||
-rw-r--r-- | drivers/vhost/test.c | 2 | ||||
-rw-r--r-- | drivers/vhost/vhost.c | 5 | ||||
-rw-r--r-- | drivers/vhost/vhost.h | 2 | ||||
-rw-r--r-- | drivers/vhost/vsock.c | 2 |
6 files changed, 7 insertions, 8 deletions
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index c7bdeb655646..a354d8d731e3 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c | |||
@@ -996,7 +996,7 @@ static int vhost_net_release(struct inode *inode, struct file *f) | |||
996 | vhost_net_stop(n, &tx_sock, &rx_sock); | 996 | vhost_net_stop(n, &tx_sock, &rx_sock); |
997 | vhost_net_flush(n); | 997 | vhost_net_flush(n); |
998 | vhost_dev_stop(&n->dev); | 998 | vhost_dev_stop(&n->dev); |
999 | vhost_dev_cleanup(&n->dev, false); | 999 | vhost_dev_cleanup(&n->dev); |
1000 | vhost_net_vq_reset(n); | 1000 | vhost_net_vq_reset(n); |
1001 | if (tx_sock) | 1001 | if (tx_sock) |
1002 | sockfd_put(tx_sock); | 1002 | sockfd_put(tx_sock); |
diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c index 1e321e9fd59a..7ad57094d736 100644 --- a/drivers/vhost/scsi.c +++ b/drivers/vhost/scsi.c | |||
@@ -1419,7 +1419,7 @@ static int vhost_scsi_release(struct inode *inode, struct file *f) | |||
1419 | mutex_unlock(&vs->dev.mutex); | 1419 | mutex_unlock(&vs->dev.mutex); |
1420 | vhost_scsi_clear_endpoint(vs, &t); | 1420 | vhost_scsi_clear_endpoint(vs, &t); |
1421 | vhost_dev_stop(&vs->dev); | 1421 | vhost_dev_stop(&vs->dev); |
1422 | vhost_dev_cleanup(&vs->dev, false); | 1422 | vhost_dev_cleanup(&vs->dev); |
1423 | /* Jobs can re-queue themselves in evt kick handler. Do extra flush. */ | 1423 | /* Jobs can re-queue themselves in evt kick handler. Do extra flush. */ |
1424 | vhost_scsi_flush(vs); | 1424 | vhost_scsi_flush(vs); |
1425 | kfree(vs->dev.vqs); | 1425 | kfree(vs->dev.vqs); |
diff --git a/drivers/vhost/test.c b/drivers/vhost/test.c index 3cc98c07dcd3..906b8f0f19f7 100644 --- a/drivers/vhost/test.c +++ b/drivers/vhost/test.c | |||
@@ -157,7 +157,7 @@ static int vhost_test_release(struct inode *inode, struct file *f) | |||
157 | 157 | ||
158 | vhost_test_stop(n, &private); | 158 | vhost_test_stop(n, &private); |
159 | vhost_test_flush(n); | 159 | vhost_test_flush(n); |
160 | vhost_dev_cleanup(&n->dev, false); | 160 | vhost_dev_cleanup(&n->dev); |
161 | /* We do an extra flush before freeing memory, | 161 | /* We do an extra flush before freeing memory, |
162 | * since jobs can re-queue themselves. */ | 162 | * since jobs can re-queue themselves. */ |
163 | vhost_test_flush(n); | 163 | vhost_test_flush(n); |
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 67fa3d153072..e5eba5acfd55 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c | |||
@@ -543,7 +543,7 @@ void vhost_dev_reset_owner(struct vhost_dev *dev, struct vhost_umem *umem) | |||
543 | { | 543 | { |
544 | int i; | 544 | int i; |
545 | 545 | ||
546 | vhost_dev_cleanup(dev, true); | 546 | vhost_dev_cleanup(dev); |
547 | 547 | ||
548 | /* Restore memory to default empty mapping. */ | 548 | /* Restore memory to default empty mapping. */ |
549 | INIT_LIST_HEAD(&umem->umem_list); | 549 | INIT_LIST_HEAD(&umem->umem_list); |
@@ -610,8 +610,7 @@ static void vhost_clear_msg(struct vhost_dev *dev) | |||
610 | spin_unlock(&dev->iotlb_lock); | 610 | spin_unlock(&dev->iotlb_lock); |
611 | } | 611 | } |
612 | 612 | ||
613 | /* Caller should have device mutex if and only if locked is set */ | 613 | void vhost_dev_cleanup(struct vhost_dev *dev) |
614 | void vhost_dev_cleanup(struct vhost_dev *dev, bool locked) | ||
615 | { | 614 | { |
616 | int i; | 615 | int i; |
617 | 616 | ||
diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 749fe13e061c..d56b711577eb 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h | |||
@@ -177,7 +177,7 @@ bool vhost_dev_has_owner(struct vhost_dev *dev); | |||
177 | long vhost_dev_check_owner(struct vhost_dev *); | 177 | long vhost_dev_check_owner(struct vhost_dev *); |
178 | struct vhost_umem *vhost_dev_reset_owner_prepare(void); | 178 | struct vhost_umem *vhost_dev_reset_owner_prepare(void); |
179 | void vhost_dev_reset_owner(struct vhost_dev *, struct vhost_umem *); | 179 | void vhost_dev_reset_owner(struct vhost_dev *, struct vhost_umem *); |
180 | void vhost_dev_cleanup(struct vhost_dev *, bool locked); | 180 | void vhost_dev_cleanup(struct vhost_dev *); |
181 | void vhost_dev_stop(struct vhost_dev *); | 181 | void vhost_dev_stop(struct vhost_dev *); |
182 | long vhost_dev_ioctl(struct vhost_dev *, unsigned int ioctl, void __user *argp); | 182 | long vhost_dev_ioctl(struct vhost_dev *, unsigned int ioctl, void __user *argp); |
183 | long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp); | 183 | long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp); |
diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c index 5a5e981bd8e4..0d14e2ff19f1 100644 --- a/drivers/vhost/vsock.c +++ b/drivers/vhost/vsock.c | |||
@@ -599,7 +599,7 @@ static int vhost_vsock_dev_release(struct inode *inode, struct file *file) | |||
599 | } | 599 | } |
600 | spin_unlock_bh(&vsock->send_pkt_list_lock); | 600 | spin_unlock_bh(&vsock->send_pkt_list_lock); |
601 | 601 | ||
602 | vhost_dev_cleanup(&vsock->dev, false); | 602 | vhost_dev_cleanup(&vsock->dev); |
603 | kfree(vsock->dev.vqs); | 603 | kfree(vsock->dev.vqs); |
604 | vhost_vsock_free(vsock); | 604 | vhost_vsock_free(vsock); |
605 | return 0; | 605 | return 0; |