All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND] Revert "vhost: fix release path lockdep checks"
@ 2015-04-17  7:58 Caspar Zhang
  0 siblings, 0 replies; 2+ messages in thread
From: Caspar Zhang @ 2015-04-17  7:58 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: Caspar Zhang, kvm, virtualization

This reverts commit ea5d404655ba ("vhost: fix release path lockdep checks")

In commit 47283bef7ed3 ("vhost: move memory pointer to VQs"), RCU
operations have been replaced by mutex, we need to remove the no longer
used `locked' parameter by reverting original patch.

Conflicts:
	drivers/vhost/net.c
	drivers/vhost/vhost.c
	drivers/vhost/vhost.h

Signed-off-by: Caspar Zhang <jinli.zjl@alibaba-inc.com>
---
 drivers/vhost/net.c   | 2 +-
 drivers/vhost/vhost.c | 6 +++---
 drivers/vhost/vhost.h | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 7d137a4..26c4837 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -793,7 +793,7 @@ static int vhost_net_release(struct inode *inode, struct file *f)
 	vhost_net_stop(n, &tx_sock, &rx_sock);
 	vhost_net_flush(n);
 	vhost_dev_stop(&n->dev);
-	vhost_dev_cleanup(&n->dev, false);
+	vhost_dev_cleanup(&n->dev);
 	vhost_net_vq_reset(n);
 	if (tx_sock)
 		sockfd_put(tx_sock);
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 2ee2826..c6640d3 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -418,7 +418,7 @@ void vhost_dev_reset_owner(struct vhost_dev *dev, struct vhost_memory *memory)
 {
 	int i;
 
-	vhost_dev_cleanup(dev, true);
+	vhost_dev_cleanup(dev);
 
 	/* Restore memory to default empty mapping. */
 	memory->nregions = 0;
@@ -444,8 +444,8 @@ void vhost_dev_stop(struct vhost_dev *dev)
 }
 EXPORT_SYMBOL_GPL(vhost_dev_stop);
 
-/* Caller should have device mutex if and only if locked is set */
-void vhost_dev_cleanup(struct vhost_dev *dev, bool locked)
+/* Caller should have device mutex */
+void vhost_dev_cleanup(struct vhost_dev *dev)
 {
 	int i;
 
diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h
index 8c1c792..cc9a742 100644
--- a/drivers/vhost/vhost.h
+++ b/drivers/vhost/vhost.h
@@ -127,7 +127,7 @@ bool vhost_dev_has_owner(struct vhost_dev *dev);
 long vhost_dev_check_owner(struct vhost_dev *);
 struct vhost_memory *vhost_dev_reset_owner_prepare(void);
 void vhost_dev_reset_owner(struct vhost_dev *, struct vhost_memory *);
-void vhost_dev_cleanup(struct vhost_dev *, bool locked);
+void vhost_dev_cleanup(struct vhost_dev *);
 void vhost_dev_stop(struct vhost_dev *);
 long vhost_dev_ioctl(struct vhost_dev *, unsigned int ioctl, void __user *argp);
 long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp);
-- 
2.2.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH RESEND] Revert "vhost: fix release path lockdep checks"
@ 2015-04-17  7:58 Caspar Zhang
  0 siblings, 0 replies; 2+ messages in thread
From: Caspar Zhang @ 2015-04-17  7:58 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: kvm, virtualization, Caspar Zhang

This reverts commit ea5d404655ba ("vhost: fix release path lockdep checks")

In commit 47283bef7ed3 ("vhost: move memory pointer to VQs"), RCU
operations have been replaced by mutex, we need to remove the no longer
used `locked' parameter by reverting original patch.

Conflicts:
	drivers/vhost/net.c
	drivers/vhost/vhost.c
	drivers/vhost/vhost.h

Signed-off-by: Caspar Zhang <jinli.zjl@alibaba-inc.com>
---
 drivers/vhost/net.c   | 2 +-
 drivers/vhost/vhost.c | 6 +++---
 drivers/vhost/vhost.h | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 7d137a4..26c4837 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -793,7 +793,7 @@ static int vhost_net_release(struct inode *inode, struct file *f)
 	vhost_net_stop(n, &tx_sock, &rx_sock);
 	vhost_net_flush(n);
 	vhost_dev_stop(&n->dev);
-	vhost_dev_cleanup(&n->dev, false);
+	vhost_dev_cleanup(&n->dev);
 	vhost_net_vq_reset(n);
 	if (tx_sock)
 		sockfd_put(tx_sock);
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 2ee2826..c6640d3 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -418,7 +418,7 @@ void vhost_dev_reset_owner(struct vhost_dev *dev, struct vhost_memory *memory)
 {
 	int i;
 
-	vhost_dev_cleanup(dev, true);
+	vhost_dev_cleanup(dev);
 
 	/* Restore memory to default empty mapping. */
 	memory->nregions = 0;
@@ -444,8 +444,8 @@ void vhost_dev_stop(struct vhost_dev *dev)
 }
 EXPORT_SYMBOL_GPL(vhost_dev_stop);
 
-/* Caller should have device mutex if and only if locked is set */
-void vhost_dev_cleanup(struct vhost_dev *dev, bool locked)
+/* Caller should have device mutex */
+void vhost_dev_cleanup(struct vhost_dev *dev)
 {
 	int i;
 
diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h
index 8c1c792..cc9a742 100644
--- a/drivers/vhost/vhost.h
+++ b/drivers/vhost/vhost.h
@@ -127,7 +127,7 @@ bool vhost_dev_has_owner(struct vhost_dev *dev);
 long vhost_dev_check_owner(struct vhost_dev *);
 struct vhost_memory *vhost_dev_reset_owner_prepare(void);
 void vhost_dev_reset_owner(struct vhost_dev *, struct vhost_memory *);
-void vhost_dev_cleanup(struct vhost_dev *, bool locked);
+void vhost_dev_cleanup(struct vhost_dev *);
 void vhost_dev_stop(struct vhost_dev *);
 long vhost_dev_ioctl(struct vhost_dev *, unsigned int ioctl, void __user *argp);
 long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp);
-- 
2.2.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-04-17  7:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-17  7:58 [PATCH RESEND] Revert "vhost: fix release path lockdep checks" Caspar Zhang
2015-04-17  7:58 Caspar Zhang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.