Il 18/04/2012 09:06, zwu.kernel@xxxxxxxxx ha scritto: > From: Zhi Yong Wu <wuzhy@xxxxxxxxxxxxxxxxxx> > > Signed-off-by: Zhi Yong Wu <wuzhy@xxxxxxxxxxxxxxxxxx> > --- > drivers/target/tcm_vhost/tcm_vhost_base.h | 2 +- > drivers/target/tcm_vhost/tcm_vhost_scsi.c | 7 ++++--- > 2 files changed, 5 insertions(+), 4 deletions(-) > > diff --git a/drivers/target/tcm_vhost/tcm_vhost_base.h b/drivers/target/tcm_vhost/tcm_vhost_base.h > index 5f64751..0e8951b 100644 > --- a/drivers/target/tcm_vhost/tcm_vhost_base.h > +++ b/drivers/target/tcm_vhost/tcm_vhost_base.h > @@ -12,7 +12,7 @@ struct tcm_vhost_cmd { > /* Pointer to the SGL formatted memory from virtio-scsi */ > struct scatterlist *tvc_sgl; > /* Pointer to response */ > - struct virtio_scsi_cmd_resp __user *tvc_footer; > + struct virtio_scsi_cmd_resp __user *tvc_resp; > /* Pointer to vhost_scsi for our device */ > struct vhost_scsi *tvc_vhost; > /* The TCM I/O descriptor that is accessed via container_of() */ > diff --git a/drivers/target/tcm_vhost/tcm_vhost_scsi.c b/drivers/target/tcm_vhost/tcm_vhost_scsi.c > index 30a2b1c..dbe1baa 100644 > --- a/drivers/target/tcm_vhost/tcm_vhost_scsi.c > +++ b/drivers/target/tcm_vhost/tcm_vhost_scsi.c > @@ -99,7 +99,7 @@ static void vhost_scsi_complete_cmd_work(struct vhost_work *work) > v_rsp.sense_len = se_cmd->scsi_sense_length; > memcpy(v_rsp.sense, tv_cmd->tvc_sense_buf, > v_rsp.sense_len); > - ret = copy_to_user(tv_cmd->tvc_footer, &v_rsp, sizeof(v_rsp)); > + ret = copy_to_user(tv_cmd->tvc_resp, &v_rsp, sizeof(v_rsp)); > if (likely(ret == 0)) > vhost_add_used(&vs->cmd_vq, tv_cmd->tvc_vq_desc, 0); > else > @@ -318,7 +318,7 @@ static void vhost_scsi_handle_vq(struct vhost_scsi *vs) > } > > /* > - * Check for a sane footer buffer so we can report errors to > + * Check for a sane resp buffer so we can report errors to > * the guest. > */ > if (unlikely(vq->iov[out + in - 1].iov_len != > @@ -359,7 +359,8 @@ static void vhost_scsi_handle_vq(struct vhost_scsi *vs) > " got %zu bytes\n", vq->iov[out + in - 1].iov_len); > break; > } > - tv_cmd->tvc_footer = vq->iov[out + in - 1].iov_base; > + > + tv_cmd->tvc_resp = vq->iov[out + in -1].iov_base; > > if (unlikely(vq->iov[1].iov_len > TCM_VHOST_MAX_CDB_SIZE)) { > pr_err("CDB length: %zu exceeds %d\n", Reviewed-by: Paolo Bonzini <pbonzini@xxxxxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html