ib_srpt: Disallow new logins during module removal

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4146 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2012-02-25 08:58:50 +00:00
parent 2d12dae7b4
commit 2553057f73

View File

@@ -3416,7 +3416,9 @@ static int srpt_release_sdev(struct srpt_device *sdev)
WARN_ON_ONCE(irqs_disabled());
BUG_ON(!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)
__srpt_close_ch(ch);
spin_unlock_irq(&sdev->spinlock);