virtiofs: No need to check fpq->connected state
authorVivek Goyal <vgoyal@redhat.com>
Tue, 15 Oct 2019 17:46:23 +0000 (13:46 -0400)
committerMiklos Szeredi <mszeredi@redhat.com>
Mon, 21 Oct 2019 13:57:07 +0000 (15:57 +0200)
In virtiofs we keep per queue connected state in virtio_fs_vq->connected
and use that to end request if queue is not connected. And virtiofs does
not even touch fpq->connected state.

We probably need to merge these two at some point of time. For now,
simplify the code a bit and do not worry about checking state of
fpq->connected.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/virtio_fs.c

index 7ea58606cc1d3e971e156364be44daf6b3ec6727..a2724b77221d6038f1c17183d20c30f250b45769 100644 (file)
@@ -960,13 +960,6 @@ __releases(fiq->lock)
 
        fpq = &fs->vqs[queue_id].fud->pq;
        spin_lock(&fpq->lock);
-       if (!fpq->connected) {
-               spin_unlock(&fpq->lock);
-               req->out.h.error = -ENODEV;
-               pr_err("virtio-fs: %s disconnected\n", __func__);
-               fuse_request_end(fc, req);
-               return;
-       }
        list_add_tail(&req->list, fpq->processing);
        spin_unlock(&fpq->lock);
        set_bit(FR_SENT, &req->flags);