Blame 0071-virtiofsd-Handle-reinit.patch

1d442b
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
1d442b
Date: Mon, 27 Jan 2020 19:01:40 +0000
1d442b
Subject: [PATCH] virtiofsd: Handle reinit
1d442b
MIME-Version: 1.0
1d442b
Content-Type: text/plain; charset=UTF-8
1d442b
Content-Transfer-Encoding: 8bit
1d442b
1d442b
Allow init->destroy->init  for mount->umount->mount
1d442b
1d442b
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
1d442b
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
1d442b
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
1d442b
(cherry picked from commit c806d6435fe95fd54b379920aca2f4e3ea1f3258)
1d442b
---
1d442b
 tools/virtiofsd/fuse_lowlevel.c | 2 ++
1d442b
 1 file changed, 2 insertions(+)
1d442b
1d442b
diff --git a/tools/virtiofsd/fuse_lowlevel.c b/tools/virtiofsd/fuse_lowlevel.c
1d442b
index a7a19685b5..7d742b5a72 100644
1d442b
--- a/tools/virtiofsd/fuse_lowlevel.c
1d442b
+++ b/tools/virtiofsd/fuse_lowlevel.c
1d442b
@@ -2028,6 +2028,7 @@ static void do_init(fuse_req_t req, fuse_ino_t nodeid,
1d442b
     }
1d442b
 
1d442b
     se->got_init = 1;
1d442b
+    se->got_destroy = 0;
1d442b
     if (se->op.init) {
1d442b
         se->op.init(se->userdata, &se->conn);
1d442b
     }
1d442b
@@ -2130,6 +2131,7 @@ static void do_destroy(fuse_req_t req, fuse_ino_t nodeid,
1d442b
     (void)iter;
1d442b
 
1d442b
     se->got_destroy = 1;
1d442b
+    se->got_init = 0;
1d442b
     if (se->op.destroy) {
1d442b
         se->op.destroy(se->userdata);
1d442b
     }