[iov_iter] new primitives - copy_from_iter_full() and friends
[GitHub/LineageOS/android_kernel_motorola_exynos9610.git] / drivers / vhost / scsi.c
index 6e29d053843d0b7f29a1aed672ac88ef8150b9d7..b296985fda0d3514d3fd5146ea8c37da00437929 100644 (file)
@@ -922,8 +922,7 @@ vhost_scsi_handle_vq(struct vhost_scsi *vs, struct vhost_virtqueue *vq)
                 */
                iov_iter_init(&out_iter, WRITE, vq->iov, out, out_size);
 
-               ret = copy_from_iter(req, req_size, &out_iter);
-               if (unlikely(ret != req_size)) {
+               if (unlikely(!copy_from_iter_full(req, req_size, &out_iter))) {
                        vq_err(vq, "Faulted on copy_from_iter\n");
                        vhost_scsi_send_bad_target(vs, vq, head, out);
                        continue;