mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	target: Delete tmr from list before processing
This patch does an explicit list_del_init(tmr->tmr_list) in core_tmr_drain_tmr_list() before starting processing of outstanding TMRs to abort, instead of explicitly checking which TMR descriptor matches the caller. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Cc: Hannes Reinecke <hare@suse.com> Cc: Christoph Hellwig <hch@lst.de> Cc: David Disseldorp <ddiss@suse.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
This commit is contained in:
		
							parent
							
								
									e3b88ee95b
								
							
						
					
					
						commit
						51ec502a32
					
				
					 1 changed files with 1 additions and 6 deletions
				
			
		| 
						 | 
					@ -215,13 +215,8 @@ static void core_tmr_drain_tmr_list(
 | 
				
			||||||
	 * LUN_RESET tmr..
 | 
						 * LUN_RESET tmr..
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	spin_lock_irqsave(&dev->se_tmr_lock, flags);
 | 
						spin_lock_irqsave(&dev->se_tmr_lock, flags);
 | 
				
			||||||
 | 
						list_del_init(&tmr->tmr_list);
 | 
				
			||||||
	list_for_each_entry_safe(tmr_p, tmr_pp, &dev->dev_tmr_list, tmr_list) {
 | 
						list_for_each_entry_safe(tmr_p, tmr_pp, &dev->dev_tmr_list, tmr_list) {
 | 
				
			||||||
		/*
 | 
					 | 
				
			||||||
		 * Allow the received TMR to return with FUNCTION_COMPLETE.
 | 
					 | 
				
			||||||
		 */
 | 
					 | 
				
			||||||
		if (tmr_p == tmr)
 | 
					 | 
				
			||||||
			continue;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		cmd = tmr_p->task_cmd;
 | 
							cmd = tmr_p->task_cmd;
 | 
				
			||||||
		if (!cmd) {
 | 
							if (!cmd) {
 | 
				
			||||||
			pr_err("Unable to locate struct se_cmd for TMR\n");
 | 
								pr_err("Unable to locate struct se_cmd for TMR\n");
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue