IB/srp: Get rid of unneeded use of list_for_each_entry_safe()
authorMatthew Wilcox <matthew@wil.cx>
Sun, 18 Jun 2006 03:37:30 +0000 (20:37 -0700)
committerRoland Dreier <rolandd@cisco.com>
Sun, 18 Jun 2006 03:37:30 +0000 (20:37 -0700)
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>
drivers/infiniband/ulp/srp/ib_srp.c

index 28d741e7805cb6d154046c28e9cb257c33d42ad5..7c0a3d9c9056fcadd6bf10b90e0039182dcc9236 100644 (file)
@@ -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;