vhost_scsi: Handle vhost_vq_work_queue failures for TMFs
[linux-block.git] / drivers / vhost / scsi.c
index 04e0d3f1bd77abcc813df434a1fad43857eb82c3..006ffacf1c56cbecf92ca7cbd2f03ee31bde913f 100644 (file)
@@ -1309,7 +1309,8 @@ static void vhost_scsi_tmf_flush_work(struct work_struct *work)
         * send our response.
         */
        vhost_dev_flush(vq->dev);
-       vhost_vq_work_queue(vq, &tmf->vwork);
+       if (!vhost_vq_work_queue(vq, &tmf->vwork))
+               vhost_scsi_release_tmf_res(tmf);
 }
 
 static void