diff mbox

9pfs: drop abusive error message from virtfs_reset()

Message ID 147769361167.18836.11552142196753043969.stgit@bahia
State New
Headers show

Commit Message

Greg Kurz Oct. 28, 2016, 10:26 p.m. UTC
The virtfs_reset() function is called either when the virtio-9p device
gets reset, or when the client starts a new 9P session. In both cases,
if it finds fids from a previous session, the following is printed in
the monitor:

9pfs:virtfs_reset: One or more uncluncked fids found during reset

For example, if a linux guest with a mounted 9P share is reset from the
monitor with system_reset, the message will be printed. This is abusive
since these fids are now clunked and the state is clean.

Signed-off-by: Greg Kurz <groug@kaod.org>
---
 hw/9pfs/9p.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

Comments

Eric Blake Oct. 31, 2016, 6:59 p.m. UTC | #1
On 10/28/2016 05:26 PM, Greg Kurz wrote:
> The virtfs_reset() function is called either when the virtio-9p device
> gets reset, or when the client starts a new 9P session. In both cases,
> if it finds fids from a previous session, the following is printed in
> the monitor:
> 
> 9pfs:virtfs_reset: One or more uncluncked fids found during reset

What's more, the error message had a typo.  Good riddance.

> 
> For example, if a linux guest with a mounted 9P share is reset from the
> monitor with system_reset, the message will be printed. This is abusive
> since these fids are now clunked and the state is clean.
> 
> Signed-off-by: Greg Kurz <groug@kaod.org>
> ---
>  hw/9pfs/9p.c |    7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)

Improvement by deletion is always fun.
Reviewed-by: Eric Blake <eblake@redhat.com>
diff mbox

Patch

diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
index 1050b89ec720..aea7e9d39206 100644
--- a/hw/9pfs/9p.c
+++ b/hw/9pfs/9p.c
@@ -535,7 +535,7 @@  static int coroutine_fn v9fs_mark_fids_unreclaim(V9fsPDU *pdu, V9fsPath *path)
 static void coroutine_fn virtfs_reset(V9fsPDU *pdu)
 {
     V9fsState *s = pdu->s;
-    V9fsFidState *fidp = NULL;
+    V9fsFidState *fidp;
 
     /* Free all fids */
     while (s->fid_list) {
@@ -548,11 +548,6 @@  static void coroutine_fn virtfs_reset(V9fsPDU *pdu)
             free_fid(pdu, fidp);
         }
     }
-    if (fidp) {
-        /* One or more unclunked fids found... */
-        error_report("9pfs:%s: One or more uncluncked fids "
-                     "found during reset", __func__);
-    }
 }
 
 #define P9_QID_TYPE_DIR         0x80