Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 549c5fc2 authored by Matthew Wilcox's avatar Matthew Wilcox Committed by Roland Dreier
Browse files

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: default avatarMatthew Wilcox <matthew@wil.cx>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 1962a4a1
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -1867,8 +1867,7 @@ static void srp_remove_one(struct ib_device *device)
		 * commands and don't try to reconnect.
		 * commands and don't try to reconnect.
		 */
		 */
		mutex_lock(&host->target_mutex);
		mutex_lock(&host->target_mutex);
		list_for_each_entry_safe(target, tmp_target,
		list_for_each_entry(target, &host->target_list, list) {
					 &host->target_list, list) {
			spin_lock_irqsave(target->scsi_host->host_lock, flags);
			spin_lock_irqsave(target->scsi_host->host_lock, flags);
			if (target->state != SRP_TARGET_REMOVED)
			if (target->state != SRP_TARGET_REMOVED)
				target->state = SRP_TARGET_REMOVED;
				target->state = SRP_TARGET_REMOVED;