diff options
author | Joern Engel <joern@logfs.org> | 2014-09-16 16:23:11 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2014-10-01 17:38:57 -0400 |
commit | 74ed7e62289dc6d388996d7c8f89c2e7e95b9657 (patch) | |
tree | 50f7364b619c59b70868b3ebe5d538a5916afabc | |
parent | 8f83269048628d7b139dacbfc6cc97befcbdd2e9 (diff) |
target: remove some smp_mb__after_atomic()s
atomic_inc_return() already does an implicit memory barrier and the
second case was moved from an atomic to a plain flag operation. If a
barrier were needed in the second case, it would have to be smp_mb(),
not a variant optimized away for x86 and other architectures.
Signed-off-by: Joern Engel <joern@logfs.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
-rw-r--r-- | drivers/target/target_core_transport.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 7fa62fc93e0b..0b43761ed85f 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c | |||
@@ -1166,7 +1166,6 @@ transport_check_alloc_task_attr(struct se_cmd *cmd) | |||
1166 | * Dormant to Active status. | 1166 | * Dormant to Active status. |
1167 | */ | 1167 | */ |
1168 | cmd->se_ordered_id = atomic_inc_return(&dev->dev_ordered_id); | 1168 | cmd->se_ordered_id = atomic_inc_return(&dev->dev_ordered_id); |
1169 | smp_mb__after_atomic(); | ||
1170 | pr_debug("Allocated se_ordered_id: %u for Task Attr: 0x%02x on %s\n", | 1169 | pr_debug("Allocated se_ordered_id: %u for Task Attr: 0x%02x on %s\n", |
1171 | cmd->se_ordered_id, cmd->sam_task_attr, | 1170 | cmd->se_ordered_id, cmd->sam_task_attr, |
1172 | dev->transport->name); | 1171 | dev->transport->name); |
@@ -2896,7 +2895,6 @@ void transport_send_task_abort(struct se_cmd *cmd) | |||
2896 | if (cmd->se_tfo->write_pending_status(cmd) != 0) { | 2895 | if (cmd->se_tfo->write_pending_status(cmd) != 0) { |
2897 | cmd->transport_state |= CMD_T_ABORTED; | 2896 | cmd->transport_state |= CMD_T_ABORTED; |
2898 | cmd->se_cmd_flags |= SCF_SEND_DELAYED_TAS; | 2897 | cmd->se_cmd_flags |= SCF_SEND_DELAYED_TAS; |
2899 | smp_mb__after_atomic(); | ||
2900 | return; | 2898 | return; |
2901 | } | 2899 | } |
2902 | } | 2900 | } |