Selaa lähdekoodia

IB/srp: Get rid of unneeded use of list_for_each_entry_safe()

list_for_each_entry_safe() is used in one place where the list isn't
modified.  So just change it to list_for_each_entry().

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Matthew Wilcox 19 vuotta sitten
vanhempi
commit
549c5fc2c8
1 muutettua tiedostoa jossa 1 lisäystä ja 2 poistoa
  1. 1 2
      drivers/infiniband/ulp/srp/ib_srp.c

+ 1 - 2
drivers/infiniband/ulp/srp/ib_srp.c

@@ -1867,8 +1867,7 @@ static void srp_remove_one(struct ib_device *device)
 		 * commands and don't try to reconnect.
 		 */
 		mutex_lock(&host->target_mutex);
-		list_for_each_entry_safe(target, tmp_target,
-					 &host->target_list, list) {
+		list_for_each_entry(target, &host->target_list, list) {
 			spin_lock_irqsave(target->scsi_host->host_lock, flags);
 			if (target->state != SRP_TARGET_REMOVED)
 				target->state = SRP_TARGET_REMOVED;