search for: virtio_fs_fiq_release

Displaying 7 results from an estimated 7 matches for "virtio_fs_fiq_release".

2019 Sep 06
2
[PATCH 15/18] virtiofs: Make virtio_fs object refcounted
On Thu, Sep 05, 2019 at 03:48:56PM -0400, Vivek Goyal wrote: > This object is used both by fuse_connection as well virt device. So make > this object reference counted and that makes it easy to define life cycle > of the object. > > Now deivce can be removed while filesystem is still mounted. This will > cleanup all the virtqueues but virtio_fs object will still be around and
2019 Sep 06
2
[PATCH 15/18] virtiofs: Make virtio_fs object refcounted
On Thu, Sep 05, 2019 at 03:48:56PM -0400, Vivek Goyal wrote: > This object is used both by fuse_connection as well virt device. So make > this object reference counted and that makes it easy to define life cycle > of the object. > > Now deivce can be removed while filesystem is still mounted. This will > cleanup all the virtqueues but virtio_fs object will still be around and
2019 Sep 06
0
[PATCH 15/18] virtiofs: Make virtio_fs object refcounted
...s *vfs = container_of(ref, struct virtio_fs, refcount); + + kfree(vfs->vqs); + kfree(vfs); +} + +static void virtio_fs_put(struct virtio_fs *fs) +{ + mutex_lock(&virtio_fs_mutex); + kref_put(&fs->refcount, release_virtio_fs_obj); + mutex_unlock(&virtio_fs_mutex); +} + +static void virtio_fs_fiq_release(struct fuse_iqueue *fiq) +{ + struct virtio_fs *vfs = fiq->priv; + virtio_fs_put(vfs); +} + static void virtio_fs_drain_queue(struct virtio_fs_vq *fsvq) { WARN_ON(fsvq->in_flight < 0); @@ -156,8 +178,10 @@ static struct virtio_fs *virtio_fs_find_ mutex_lock(&virtio_fs_mutex);...
2019 Sep 06
2
[PATCH 16/18] virtiofs: Use virtio_fs_mutex for races w.r.t ->remove and mount path
On Thu, Sep 05, 2019 at 03:48:57PM -0400, Vivek Goyal wrote: > It is possible that a mount is in progress and device is being removed at > the same time. Use virtio_fs_mutex to avoid races. > > This also takes care of bunch of races and removes some TODO items. > > Signed-off-by: Vivek Goyal <vgoyal at redhat.com> > --- > fs/fuse/virtio_fs.c | 32
2019 Sep 06
2
[PATCH 16/18] virtiofs: Use virtio_fs_mutex for races w.r.t ->remove and mount path
On Thu, Sep 05, 2019 at 03:48:57PM -0400, Vivek Goyal wrote: > It is possible that a mount is in progress and device is being removed at > the same time. Use virtio_fs_mutex to avoid races. > > This also takes care of bunch of races and removes some TODO items. > > Signed-off-by: Vivek Goyal <vgoyal at redhat.com> > --- > fs/fuse/virtio_fs.c | 32
2019 Sep 06
0
[PATCH 16/18] virtiofs: Use virtio_fs_mutex for races w.r.t ->remove and mount path
...tatic void release_virtio_fs_obj(struct kfree(vfs); } +/* Make sure virtiofs_mutex is held */ static void virtio_fs_put(struct virtio_fs *fs) { - mutex_lock(&virtio_fs_mutex); kref_put(&fs->refcount, release_virtio_fs_obj); - mutex_unlock(&virtio_fs_mutex); } static void virtio_fs_fiq_release(struct fuse_iqueue *fiq) { struct virtio_fs *vfs = fiq->priv; + + mutex_lock(&virtio_fs_mutex); virtio_fs_put(vfs); + mutex_unlock(&virtio_fs_mutex); } static void virtio_fs_drain_queue(struct virtio_fs_vq *fsvq) @@ -596,9 +600,8 @@ static void virtio_fs_remove(struct virt str...
2019 Sep 18
0
[PATCH v6] virtio-fs: add virtiofs filesystem
...struct virtio_fs, refcount); > + > + kfree(vfs->vqs); > + kfree(vfs); > +} > + > +/* Make sure virtiofs_mutex is held */ > +static void virtio_fs_put(struct virtio_fs *fs) > +{ > + kref_put(&fs->refcount, release_virtio_fs_obj); > +} > + > +static void virtio_fs_fiq_release(struct fuse_iqueue *fiq) > +{ > + struct virtio_fs *vfs = fiq->priv; > + > + mutex_lock(&virtio_fs_mutex); > + virtio_fs_put(vfs); > + mutex_unlock(&virtio_fs_mutex); > +} > + > +static void virtio_fs_drain_queue(struct virtio_fs_vq *fsvq) > +{ > + WARN_O...