Re: [Xen-devel] [PATCH 1/3] xen: mark pvscsi frontend request consumed only after last read

From: Jan Beulich
Date: Fri Jan 30 2015 - 06:47:19 EST


>>> On 30.01.15 at 12:21, <JGross@xxxxxxxx> wrote:
> @@ -734,11 +734,11 @@ static int scsiback_do_cmd_fn(struct vscsibk_info *info)
> if (!pending_req)
> return 1;
>
> - ring_req = RING_GET_REQUEST(ring, rc);
> + memcpy(&ring_req, RING_GET_REQUEST(ring, rc), sizeof(ring_req));

I'd recommend the type safe *ring_req = *RING_GET_REQUEST(ring, rc)
here.

> ring->req_cons = ++rc;
>
> - act = ring_req->act;
> - err = prepare_pending_reqs(info, ring_req, pending_req);
> + act = ring_req.act;

Is this helper variable then still needed?

Jan

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/