diff mbox

vhost: Fix typo in comment

Message ID 20110831074348.22973.7545.stgit@t
State Rejected
Headers show

Commit Message

Amos Kong Aug. 31, 2011, 7:43 a.m. UTC
vhost_dev_stop() and vhost_dev_disable_notifiers() are called in
vhost_net_stop(), correct this comment.

Signed-off-by: Amos Kong <akong@redhat.com>
---
 hw/vhost.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Michael S. Tsirkin Aug. 31, 2011, 7:48 a.m. UTC | #1
On Wed, Aug 31, 2011 at 03:43:48PM +0800, Amos Kong wrote:
> vhost_dev_stop() and vhost_dev_disable_notifiers() are called in
> vhost_net_stop(), correct this comment.
> 
> Signed-off-by: Amos Kong <akong@redhat.com>
> ---
>  hw/vhost.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/hw/vhost.c b/hw/vhost.c
> index 0870cb7..640aff0 100644
> --- a/hw/vhost.c
> +++ b/hw/vhost.c
> @@ -797,7 +797,7 @@ fail:
>      return r;
>  }
>  
> -/* Host notifiers must be enabled at this point. */
> +/* Host notifiers must be disabled at this point. */
>  void vhost_dev_stop(struct vhost_dev *hdev, VirtIODevice *vdev)
>  {
>      int i, r;

Well it looks like we first call vhost_dev_stop and
only afterwards vhost_dev_disable_notifiers.
So when vhost_dev_stop is called notifiers are enabled,
and they really must be otherwise stuff will fail.
Isn't this what the original comment says?
If that's not clear, what would be a better wording?
Amos Kong Aug. 31, 2011, 8:53 a.m. UTC | #2
----- Original Message -----
> On Wed, Aug 31, 2011 at 03:43:48PM +0800, Amos Kong wrote:
> > vhost_dev_stop() and vhost_dev_disable_notifiers() are called in
> > vhost_net_stop(), correct this comment.
> >
> > Signed-off-by: Amos Kong <akong@redhat.com>
> > ---
> >  hw/vhost.c | 2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/hw/vhost.c b/hw/vhost.c
> > index 0870cb7..640aff0 100644
> > --- a/hw/vhost.c
> > +++ b/hw/vhost.c
> > @@ -797,7 +797,7 @@ fail:
> >      return r;
> >  }
> >
> > -/* Host notifiers must be enabled at this point. */
> > +/* Host notifiers must be disabled at this point. */
> >  void vhost_dev_stop(struct vhost_dev *hdev, VirtIODevice *vdev)
> >  {
> >      int i, r;
> 
> Well it looks like we first call vhost_dev_stop and
> only afterwards vhost_dev_disable_notifiers.
> So when vhost_dev_stop is called notifiers are enabled,
> and they really must be otherwise stuff will fail.
> Isn't this what the original comment says?
> If that's not clear, what would be a better wording?

It's my fault to misunderstand the meaning, we can ignore this patch.

Thanks,
Amos
diff mbox

Patch

diff --git a/hw/vhost.c b/hw/vhost.c
index 0870cb7..640aff0 100644
--- a/hw/vhost.c
+++ b/hw/vhost.c
@@ -797,7 +797,7 @@  fail:
     return r;
 }
 
-/* Host notifiers must be enabled at this point. */
+/* Host notifiers must be disabled at this point. */
 void vhost_dev_stop(struct vhost_dev *hdev, VirtIODevice *vdev)
 {
     int i, r;