Displaying 6 results from an estimated 6 matches for "fuse_conn_put".
2019 Sep 06
1
[PATCH 14/18] virtiofs: Add a fuse_iqueue operation to put() reference
...ld
theoretically do more than just release priv.
I think one of the following would be clearer:
/**
* Drop a reference to fiq->priv.
*/
void (*put_priv)(void *priv);
Or:
/**
* Clean up when fuse_iqueue is destroyed.
*/
void (*release)(struct fuse_iqueue *fiq);
In the second case fuse_conn_put() shouldn't check fiq->priv.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.linuxfoundation.org/pipermail/virtualization/attachments/20190906/ded43aaa/...
2019 Sep 05
0
[PATCH 14/18] virtiofs: Add a fuse_iqueue operation to put() reference
...on fiq_priv.
+ */
+ void (*put)(struct fuse_iqueue *fiq);
};
/** /dev/fuse input queue operations */
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 7fa0dcc6f565..70a433bdf01f 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -631,8 +631,14 @@ EXPORT_SYMBOL_GPL(fuse_conn_init);
void fuse_conn_put(struct fuse_conn *fc)
{
if (refcount_dec_and_test(&fc->count)) {
+ struct fuse_iqueue *fiq = &fc->iq;
+
if (fc->destroy_req)
fuse_request_free(fc->destroy_req);
+ if (fiq->priv && fiq->ops->put) {
+ fiq->ops->put(fiq);
+ fiq->priv = NULL...
2019 Sep 18
0
[PATCH v6] virtio-fs: add virtiofs filesystem
..._iqueue *fiq);
> };
>
> /** /dev/fuse input queue operations */
> diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
> index 10d193b24fb8..3d598a5bb5b5 100644
> --- a/fs/fuse/inode.c
> +++ b/fs/fuse/inode.c
> @@ -630,6 +630,10 @@ EXPORT_SYMBOL_GPL(fuse_conn_init);
> void fuse_conn_put(struct fuse_conn *fc)
> {
> if (refcount_dec_and_test(&fc->count)) {
> + struct fuse_iqueue *fiq = &fc->iq;
> +
> + if (fiq->ops->release)
> + fiq->ops->release(fiq);
> put_pid_ns(fc->pid_ns);
> put_user_ns(fc->user_ns);
> f...
2019 Sep 05
38
[PATCH 00/18] virtiofs: Fix various races and cleanups round 1
Hi,
Michael Tsirkin pointed out issues w.r.t various locking related TODO
items and races w.r.t device removal.
In this first round of cleanups, I have taken care of most pressing
issues.
These patches apply on top of following.
git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git#virtiofs-v4
I have tested these patches with mount/umount and device removal using
qemu monitor. For
2019 Sep 03
4
[PATCH v4 15/16] virtio-fs: add virtiofs filesystem
...;
> +
> + fuse_conn_init(fc, get_user_ns(current_user_ns()), &virtio_fs_fiq_ops,
> + fs);
> + fc->release = fuse_free_conn;
> + fc->delete_stale = true;
> +
> + fsc->s_fs_info = fc;
> + sb = sget_fc(fsc, virtio_fs_test_super, virtio_fs_set_super);
> + fuse_conn_put(fc);
> + if (IS_ERR(sb))
> + return PTR_ERR(sb);
> +
> + if (!sb->s_root) {
> + err = virtio_fs_fill_super(sb);
> + if (err) {
> + deactivate_locked_super(sb);
> + return err;
> + }
> +
> + sb->s_flags |= SB_ACTIVE;
> + }
> +
> + WARN_ON(fsc-...
2019 Sep 03
4
[PATCH v4 15/16] virtio-fs: add virtiofs filesystem
...;
> +
> + fuse_conn_init(fc, get_user_ns(current_user_ns()), &virtio_fs_fiq_ops,
> + fs);
> + fc->release = fuse_free_conn;
> + fc->delete_stale = true;
> +
> + fsc->s_fs_info = fc;
> + sb = sget_fc(fsc, virtio_fs_test_super, virtio_fs_set_super);
> + fuse_conn_put(fc);
> + if (IS_ERR(sb))
> + return PTR_ERR(sb);
> +
> + if (!sb->s_root) {
> + err = virtio_fs_fill_super(sb);
> + if (err) {
> + deactivate_locked_super(sb);
> + return err;
> + }
> +
> + sb->s_flags |= SB_ACTIVE;
> + }
> +
> + WARN_ON(fsc-...