Message ID | 1490000964-15732-5-git-send-email-lixiubo@cmss.chinamobile.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c index 780c30f..e3daf15 100644 --- a/drivers/target/target_core_user.c +++ b/drivers/target/target_core_user.c @@ -598,8 +598,7 @@ static bool is_ring_space_avail(struct tcmu_dev *udev, struct tcmu_cmd *cmd, * expensive to tell how many regions are freed in the bitmap */ base_command_size = max(offsetof(struct tcmu_cmd_entry, - req.iov[se_cmd->t_bidi_data_nents + - se_cmd->t_data_nents]), + req.iov[tcmu_cmd->dbi_len]), sizeof(struct tcmu_cmd_entry)); command_size = base_command_size + round_up(scsi_command_size(se_cmd->t_task_cdb), TCMU_OP_ALIGN_SIZE);