You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
RDMA/srp: Fix srp_abort()
commit6dbe4a8deaupstream. Fix the code for converting a SCSI command pointer into an SRP request pointer. Cc: Xiao Yang <yangx.jy@fujitsu.com> Fixes:ad215aaea4("RDMA/srp: Make struct scsi_cmnd and struct srp_request adjacent") Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20220908233139.3042628-1-bvanassche@acm.org Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
f022576aa0
commit
db375fa550
@@ -2778,15 +2778,13 @@ static int srp_send_tsk_mgmt(struct srp_rdma_ch *ch, u64 req_tag, u64 lun,
|
||||
static int srp_abort(struct scsi_cmnd *scmnd)
|
||||
{
|
||||
struct srp_target_port *target = host_to_target(scmnd->device->host);
|
||||
struct srp_request *req = (struct srp_request *) scmnd->host_scribble;
|
||||
struct srp_request *req = scsi_cmd_priv(scmnd);
|
||||
u32 tag;
|
||||
u16 ch_idx;
|
||||
struct srp_rdma_ch *ch;
|
||||
|
||||
shost_printk(KERN_ERR, target->scsi_host, "SRP abort called\n");
|
||||
|
||||
if (!req)
|
||||
return SUCCESS;
|
||||
tag = blk_mq_unique_tag(scmnd->request);
|
||||
ch_idx = blk_mq_unique_tag_to_hwq(tag);
|
||||
if (WARN_ON_ONCE(ch_idx >= target->ch_count))
|
||||
|
||||
Reference in New Issue
Block a user