Skip to content

Commit

Permalink
scsi: target: tcmu: Remove unnecessary bit TCMU_CMD_BIT_INFLIGHT
Browse files Browse the repository at this point in the history
Since commit 61fb248 ("scsi: target: tcmu: Userspace must not complete
queued commands") tcmu_cmd bit TCMU_CMD_BIT_INFLIGHT is set but never
checked.  So we can remove it safely.

[mkp: fixed Mike's email address]

Link: https://lore.kernel.org/r/20200619173806.5016-1-bstroesser@ts.fujitsu.com
Signed-off-by: Bodo Stroesser <bstroesser@ts.fujitsu.com>
Acked-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
Bodo Stroesser authored and Martin K. Petersen committed Jun 20, 2020
1 parent 393403e commit da3f28d
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/target/target_core_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ struct tcmu_cmd {
unsigned long deadline;

#define TCMU_CMD_BIT_EXPIRED 0
#define TCMU_CMD_BIT_INFLIGHT 1
unsigned long flags;
};
/*
Expand Down Expand Up @@ -1078,7 +1077,6 @@ static int queue_cmd_ring(struct tcmu_cmd *tcmu_cmd, sense_reason_t *scsi_err)
tcmu_flush_dcache_range(mb, sizeof(*mb));

list_add_tail(&tcmu_cmd->queue_entry, &udev->inflight_queue);
set_bit(TCMU_CMD_BIT_INFLIGHT, &tcmu_cmd->flags);

/* TODO: only if FLUSH and FUA? */
uio_event_notify(&udev->uio_info);
Expand Down

0 comments on commit da3f28d

Please sign in to comment.