On Mon, Feb 20, 2017 at 03:39:59PM +0100, Greg Kurz wrote: > This patch opens the shared folder and caches the file descriptor, so that > it can be used to do symlink-safe path walk. > > Signed-off-by: Greg Kurz > --- > hw/9pfs/9p-local.c | 30 ++++++++++++++++++++++++++++-- > 1 file changed, 28 insertions(+), 2 deletions(-) > > diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c > index c2239bfafce4..8aee7f2516ed 100644 > --- a/hw/9pfs/9p-local.c > +++ b/hw/9pfs/9p-local.c > @@ -14,6 +14,7 @@ > #include "qemu/osdep.h" > #include "9p.h" > #include "9p-xattr.h" > +#include "9p-util.h" > #include "fsdev/qemu-fsdev.h" /* local_ops */ > #include > #include > @@ -43,6 +44,10 @@ > #define BTRFS_SUPER_MAGIC 0x9123683E > #endif > > +struct local_data { QEMU coding style would requires: typedef struct { int mountfd; } LocalData; Otherwise: Reviewed-by: Stefan Hajnoczi