From 8d775b8f3964384e1cac17a849459a90bc78a2f6 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 2 May 2012 09:35:40 +0000 Subject: [PATCH] ib_srpt: Replace list_for_each_entry_safe() by list_for_each_entry() where this is safe git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4264 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- srpt/src/ib_srpt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index b4600ac75..d803c55c4 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -3407,7 +3407,7 @@ static int srpt_ch_list_empty(struct srpt_device *sdev) */ static int srpt_release_sdev(struct srpt_device *sdev) { - struct srpt_rdma_ch *ch, *next_ch; + struct srpt_rdma_ch *ch; TRACE_ENTRY(); @@ -3417,7 +3417,7 @@ static int srpt_release_sdev(struct srpt_device *sdev) /* Disallow new logins and close all active sessions. */ spin_lock_irq(&sdev->spinlock); sdev->enabled = false; - list_for_each_entry_safe(ch, next_ch, &sdev->rch_list, list) + list_for_each_entry(ch, &sdev->rch_list, list) __srpt_close_ch(ch); spin_unlock_irq(&sdev->spinlock); @@ -3426,7 +3426,7 @@ static int srpt_release_sdev(struct srpt_device *sdev) PRINT_INFO("%s: waiting for session unregistration ...", sdev->device->name); spin_lock_irq(&sdev->spinlock); - list_for_each_entry_safe(ch, next_ch, &sdev->rch_list, list) { + list_for_each_entry(ch, &sdev->rch_list, list) { PRINT_INFO("%s: state %s; %d commands in progress", ch->sess_name, get_ch_state_name(ch->state), atomic_read(&ch->scst_sess->sess_cmd_count));