Skip to content

Commit aad13ca

Browse files
Christoph HellwigNicholas Bellinger
authored andcommitted
target: remove the se_ordered_node se_cmd field
We never walk ordered_cmd_list in the se_device, so remove all code related to supporting it. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
1 parent 58a2801 commit aad13ca

2 files changed

Lines changed: 0 additions & 14 deletions

File tree

‎drivers/target/target_core_transport.c‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,12 +1332,10 @@ struct se_device *transport_add_device_to_core_hba(
13321332
INIT_LIST_HEAD(&dev->dev_tmr_list);
13331333
INIT_LIST_HEAD(&dev->execute_task_list);
13341334
INIT_LIST_HEAD(&dev->delayed_cmd_list);
1335-
INIT_LIST_HEAD(&dev->ordered_cmd_list);
13361335
INIT_LIST_HEAD(&dev->state_task_list);
13371336
INIT_LIST_HEAD(&dev->qf_cmd_list);
13381337
spin_lock_init(&dev->execute_task_lock);
13391338
spin_lock_init(&dev->delayed_cmd_lock);
1340-
spin_lock_init(&dev->ordered_cmd_lock);
13411339
spin_lock_init(&dev->state_task_lock);
13421340
spin_lock_init(&dev->dev_alua_lock);
13431341
spin_lock_init(&dev->dev_reservation_lock);
@@ -1498,7 +1496,6 @@ void transport_init_se_cmd(
14981496
{
14991497
INIT_LIST_HEAD(&cmd->se_lun_node);
15001498
INIT_LIST_HEAD(&cmd->se_delayed_node);
1501-
INIT_LIST_HEAD(&cmd->se_ordered_node);
15021499
INIT_LIST_HEAD(&cmd->se_qf_node);
15031500
INIT_LIST_HEAD(&cmd->se_queue_node);
15041501
INIT_LIST_HEAD(&cmd->se_cmd_list);
@@ -1963,11 +1960,6 @@ static inline int transport_execute_task_attr(struct se_cmd *cmd)
19631960
cmd->se_ordered_id);
19641961
return 1;
19651962
} else if (cmd->sam_task_attr == MSG_ORDERED_TAG) {
1966-
spin_lock(&cmd->se_dev->ordered_cmd_lock);
1967-
list_add_tail(&cmd->se_ordered_node,
1968-
&cmd->se_dev->ordered_cmd_list);
1969-
spin_unlock(&cmd->se_dev->ordered_cmd_lock);
1970-
19711963
atomic_inc(&cmd->se_dev->dev_ordered_sync);
19721964
smp_mb__after_atomic_inc();
19731965

@@ -3100,11 +3092,8 @@ static void transport_complete_task_attr(struct se_cmd *cmd)
31003092
" HEAD_OF_QUEUE: %u\n", dev->dev_cur_ordered_id,
31013093
cmd->se_ordered_id);
31023094
} else if (cmd->sam_task_attr == MSG_ORDERED_TAG) {
3103-
spin_lock(&dev->ordered_cmd_lock);
3104-
list_del(&cmd->se_ordered_node);
31053095
atomic_dec(&dev->dev_ordered_sync);
31063096
smp_mb__after_atomic_dec();
3107-
spin_unlock(&dev->ordered_cmd_lock);
31083097

31093098
dev->dev_cur_ordered_id++;
31103099
pr_debug("Incremented dev_cur_ordered_id: %u for ORDERED:"

‎include/target/target_core_base.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,6 @@ struct se_cmd {
439439
/* Used for sense data */
440440
void *sense_buffer;
441441
struct list_head se_delayed_node;
442-
struct list_head se_ordered_node;
443442
struct list_head se_lun_node;
444443
struct list_head se_qf_node;
445444
struct se_device *se_dev;
@@ -730,7 +729,6 @@ struct se_device {
730729
struct se_obj dev_export_obj;
731730
struct se_queue_obj dev_queue_obj;
732731
spinlock_t delayed_cmd_lock;
733-
spinlock_t ordered_cmd_lock;
734732
spinlock_t execute_task_lock;
735733
spinlock_t state_task_lock;
736734
spinlock_t dev_alua_lock;
@@ -756,7 +754,6 @@ struct se_device {
756754
struct task_struct *dev_mgmt_thread;
757755
struct work_struct qf_work_queue;
758756
struct list_head delayed_cmd_list;
759-
struct list_head ordered_cmd_list;
760757
struct list_head execute_task_list;
761758
struct list_head state_task_list;
762759
struct list_head qf_cmd_list;

0 commit comments

Comments
 (0)