aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/target_core_transport.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index 1f28d1804e15..68f0c8dbc03b 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -720,6 +720,8 @@ static void target_add_to_state_list(struct se_cmd *cmd)
720/* 720/*
721 * Handle QUEUE_FULL / -EAGAIN and -ENOMEM status 721 * Handle QUEUE_FULL / -EAGAIN and -ENOMEM status
722 */ 722 */
723static void transport_write_pending_qf(struct se_cmd *cmd);
724static void transport_complete_qf(struct se_cmd *cmd);
723 725
724static void target_qf_do_work(struct work_struct *work) 726static void target_qf_do_work(struct work_struct *work)
725{ 727{
@@ -743,7 +745,10 @@ static void target_qf_do_work(struct work_struct *work)
743 (cmd->t_state == TRANSPORT_COMPLETE_QF_WP) ? "WRITE_PENDING" 745 (cmd->t_state == TRANSPORT_COMPLETE_QF_WP) ? "WRITE_PENDING"
744 : "UNKNOWN"); 746 : "UNKNOWN");
745 747
746 transport_add_cmd_to_queue(cmd, cmd->t_state, true); 748 if (cmd->t_state == TRANSPORT_COMPLETE_QF_WP)
749 transport_write_pending_qf(cmd);
750 else if (cmd->t_state == TRANSPORT_COMPLETE_QF_OK)
751 transport_complete_qf(cmd);
747 } 752 }
748} 753}
749 754
@@ -3262,12 +3267,6 @@ get_cmd:
3262 case TRANSPORT_PROCESS_TMR: 3267 case TRANSPORT_PROCESS_TMR:
3263 transport_generic_do_tmr(cmd); 3268 transport_generic_do_tmr(cmd);
3264 break; 3269 break;
3265 case TRANSPORT_COMPLETE_QF_WP:
3266 transport_write_pending_qf(cmd);
3267 break;
3268 case TRANSPORT_COMPLETE_QF_OK:
3269 transport_complete_qf(cmd);
3270 break;
3271 default: 3270 default:
3272 pr_err("Unknown t_state: %d for ITT: 0x%08x " 3271 pr_err("Unknown t_state: %d for ITT: 0x%08x "
3273 "i_state: %d on SE LUN: %u\n", 3272 "i_state: %d on SE LUN: %u\n",