vhost: Fix typo in comment
PATCH 1/1 vhost: Fix typo in comment
vhost_dev_stop() and vhost_dev_disable_notifiers() are called in vhost_net_stop(), correct this comment.
--- hw/vhost.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
hw/vhost.c +1 -1
@@ -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;
Quoted 13 lines · Amos Kong
vhost_dev_stop()andvhost_dev_disable_notifiers()are called invhost_net_stop(), correct this comment.Signed-off-by Amos Kong <[email protected]>--- hw/vhost.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)hw/vhost.c +0
-0
hw/vhost.c fail: · line 803
Quoted 8 lines
hw/vhost.c +1
-1@@ -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?
Signature · 1 line
MST
----- Original Message -----
Quoted 17 lines · Amos Kong
Quoted 16 lines
vhost_dev_stop()andvhost_dev_disable_notifiers()are called invhost_net_stop(), correct this comment.Signed-off-by Amos Kong <[email protected]>--- hw/vhost.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)hw/vhost.c +0
-0@@ -797,7 +797,7 @@ fail:return r; }
Quoted 12 lines
hw/vhost.c fail: · line 803
Quoted 5 lines
hw/vhost.c +1
-1-/* 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_stopand only afterwardsvhost_dev_disable_notifiers. So whenvhost_dev_stopis 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