Re: [PATCH 4/7] xen/9pfs: connect to the backend

2017-03-08 Thread Stefano Stabellini
On Wed, 8 Mar 2017, Boris Ostrovsky wrote: > >>> + ring->bytes = (void*)__get_free_pages(GFP_KERNEL | __GFP_ZERO, > >>> XEN_9PFS_RING_ORDER); > >>> + if (ring->bytes == NULL) > >>> + goto error; > >>> + for (i = 0; i < (1 << XEN_9PFS_RING_ORDER); i++) > >>> + ring->intf->ref[i] =

Re: [PATCH 4/7] xen/9pfs: connect to the backend

2017-03-08 Thread Stefano Stabellini
On Wed, 8 Mar 2017, Boris Ostrovsky wrote: > >>> + ring->bytes = (void*)__get_free_pages(GFP_KERNEL | __GFP_ZERO, > >>> XEN_9PFS_RING_ORDER); > >>> + if (ring->bytes == NULL) > >>> + goto error; > >>> + for (i = 0; i < (1 << XEN_9PFS_RING_ORDER); i++) > >>> + ring->intf->ref[i] =

Re: [PATCH 4/7] xen/9pfs: connect to the backend

2017-03-08 Thread Boris Ostrovsky
> >>> + ring->bytes = (void*)__get_free_pages(GFP_KERNEL | __GFP_ZERO, >>> XEN_9PFS_RING_ORDER); >>> + if (ring->bytes == NULL) >>> + goto error; >>> + for (i = 0; i < (1 << XEN_9PFS_RING_ORDER); i++) >>> + ring->intf->ref[i] = >>>

Re: [PATCH 4/7] xen/9pfs: connect to the backend

2017-03-08 Thread Boris Ostrovsky
> >>> + ring->bytes = (void*)__get_free_pages(GFP_KERNEL | __GFP_ZERO, >>> XEN_9PFS_RING_ORDER); >>> + if (ring->bytes == NULL) >>> + goto error; >>> + for (i = 0; i < (1 << XEN_9PFS_RING_ORDER); i++) >>> + ring->intf->ref[i] = >>>

Re: [PATCH 4/7] xen/9pfs: connect to the backend

2017-03-07 Thread Stefano Stabellini
On Tue, 7 Mar 2017, Boris Ostrovsky wrote: > > +static int xen_9pfs_front_free(struct xen_9pfs_front_priv *priv) > > +{ > > + int i, j; > > + > > + list_del(>list); > > + > > + for (i = 0; i < priv->num_rings; i++) { > > + if (priv->rings[i].intf == NULL) > > +

Re: [PATCH 4/7] xen/9pfs: connect to the backend

2017-03-07 Thread Stefano Stabellini
On Tue, 7 Mar 2017, Boris Ostrovsky wrote: > > +static int xen_9pfs_front_free(struct xen_9pfs_front_priv *priv) > > +{ > > + int i, j; > > + > > + list_del(>list); > > + > > + for (i = 0; i < priv->num_rings; i++) { > > + if (priv->rings[i].intf == NULL) > > +

Re: [PATCH 4/7] xen/9pfs: connect to the backend

2017-03-07 Thread Boris Ostrovsky
> > +static int xen_9pfs_front_free(struct xen_9pfs_front_priv *priv) > +{ > + int i, j; > + > + list_del(>list); > + > + for (i = 0; i < priv->num_rings; i++) { > + if (priv->rings[i].intf == NULL) > + break; Are we guaranteed that all subsequent

Re: [PATCH 4/7] xen/9pfs: connect to the backend

2017-03-07 Thread Boris Ostrovsky
> > +static int xen_9pfs_front_free(struct xen_9pfs_front_priv *priv) > +{ > + int i, j; > + > + list_del(>list); > + > + for (i = 0; i < priv->num_rings; i++) { > + if (priv->rings[i].intf == NULL) > + break; Are we guaranteed that all subsequent