Skip to content

Commit

Permalink
IB/srp: Get rid of unneeded use of list_for_each_entry_safe()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Matthew Wilcox authored and Roland Dreier committed Jun 18, 2006
1 parent 1962a4a commit 549c5fc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/infiniband/ulp/srp/ib_srp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 549c5fc

Please sign in to comment.