summaryrefslogtreecommitdiffstats
path: root/fs/fuse/cuse.c
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2018-06-18 15:53:19 +0100
committerMiklos Szeredi <mszeredi@redhat.com>2019-09-12 14:59:41 +0200
commitae3aad77f46fbba56eff7141b2fc49870b60827e (patch)
tree066161473fe29b6b0c37b94cf351df23744479cf /fs/fuse/cuse.c
parent0cc2656cdb0b1f234e6d29378cb061e29d7522bc (diff)
downloadlinux-ae3aad77f46fbba56eff7141b2fc49870b60827e.tar.bz2
fuse: add fuse_iqueue_ops callbacks
The /dev/fuse device uses fiq->waitq and fasync to signal that requests are available. These mechanisms do not apply to virtio-fs. This patch introduces callbacks so alternative behavior can be used. Note that queue_interrupt() changes along these lines: spin_lock(&fiq->waitq.lock); wake_up_locked(&fiq->waitq); + kill_fasync(&fiq->fasync, SIGIO, POLL_IN); spin_unlock(&fiq->waitq.lock); - kill_fasync(&fiq->fasync, SIGIO, POLL_IN); Since queue_request() and queue_forget() also call kill_fasync() inside the spinlock this should be safe. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/fuse/cuse.c')
-rw-r--r--fs/fuse/cuse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fuse/cuse.c b/fs/fuse/cuse.c
index 2332e7f960a8..6a0de0ce4403 100644
--- a/fs/fuse/cuse.c
+++ b/fs/fuse/cuse.c
@@ -506,7 +506,7 @@ static int cuse_channel_open(struct inode *inode, struct file *file)
* Limit the cuse channel to requests that can
* be represented in file->f_cred->user_ns.
*/
- fuse_conn_init(&cc->fc, file->f_cred->user_ns);
+ fuse_conn_init(&cc->fc, file->f_cred->user_ns, &fuse_dev_fiq_ops, NULL);
fud = fuse_dev_alloc(&cc->fc);
if (!fud) {