mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-19 03:31:26 +00:00
Merge r6017 from the iser branch
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.0.x@6277 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -309,7 +309,6 @@ static void isert_delete_conn_dev(struct isert_conn_dev *conn_dev)
|
||||
BUG_ON(conn_dev->conn == NULL);
|
||||
isert_close_connection(conn_dev->conn);
|
||||
}
|
||||
list_del(&conn_dev->conn_list_entry);
|
||||
}
|
||||
|
||||
static int isert_listen_release(struct inode *inode, struct file *filp)
|
||||
@@ -317,22 +316,13 @@ static int isert_listen_release(struct inode *inode, struct file *filp)
|
||||
struct isert_listener_dev *dev = filp->private_data;
|
||||
struct isert_conn_dev *conn_dev;
|
||||
|
||||
/* No need for locking here, since the chardev is being closed */
|
||||
while (!list_empty(&dev->new_conn_list)) {
|
||||
conn_dev = list_first_entry(&dev->new_conn_list,
|
||||
struct isert_conn_dev,
|
||||
conn_list_entry);
|
||||
|
||||
spin_lock(&isert_listen_dev.conn_lock);
|
||||
list_for_each_entry(conn_dev, &dev->new_conn_list, conn_list_entry)
|
||||
isert_delete_conn_dev(conn_dev);
|
||||
}
|
||||
|
||||
while (!list_empty(&dev->curr_conn_list)) {
|
||||
conn_dev = list_first_entry(&dev->curr_conn_list,
|
||||
struct isert_conn_dev,
|
||||
conn_list_entry);
|
||||
|
||||
list_for_each_entry(conn_dev, &dev->curr_conn_list, conn_list_entry)
|
||||
isert_delete_conn_dev(conn_dev);
|
||||
}
|
||||
spin_unlock(&isert_listen_dev.conn_lock);
|
||||
|
||||
atomic_inc(&dev->available);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user