struct gb_operation *operation;
spin_lock_irq(&connection->lock);
-
- WARN_ON(!list_empty(&connection->operations));
-
while (!list_empty(&connection->operations)) {
operation = list_last_entry(&connection->operations,
struct gb_operation, links);
if (WARN_ON(!connection))
return;
- gb_connection_cancel_operations(connection, -ESHUTDOWN);
-
spin_lock_irq(&gb_connections_lock);
list_del(&connection->bundle_links);
list_del(&connection->hd_links);
connection->state = GB_CONNECTION_STATE_DESTROYING;
spin_unlock_irq(&connection->lock);
+ gb_connection_cancel_operations(connection, -ESHUTDOWN);
+
connection->protocol->connection_exit(connection);
/*