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:
Bart Van Assche
2015-06-11 16:43:08 +00:00
parent 0820ea491c
commit c7d8a1fa7d

View File

@@ -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;