| .. | .. |
|---|
| 124 | 124 | return; |
|---|
| 125 | 125 | |
|---|
| 126 | 126 | write_lock_irq(&adapter->port_list_lock); |
|---|
| 127 | | - list_for_each_entry_safe(port, p, &adapter->port_list, list) { |
|---|
| 127 | + list_for_each_entry(port, &adapter->port_list, list) { |
|---|
| 128 | 128 | write_lock(&port->unit_list_lock); |
|---|
| 129 | | - list_for_each_entry_safe(unit, u, &port->unit_list, list) |
|---|
| 130 | | - list_move(&unit->list, &unit_remove_lh); |
|---|
| 129 | + list_splice_init(&port->unit_list, &unit_remove_lh); |
|---|
| 131 | 130 | write_unlock(&port->unit_list_lock); |
|---|
| 132 | | - list_move(&port->list, &port_remove_lh); |
|---|
| 133 | 131 | } |
|---|
| 132 | + list_splice_init(&adapter->port_list, &port_remove_lh); |
|---|
| 134 | 133 | write_unlock_irq(&adapter->port_list_lock); |
|---|
| 135 | 134 | zfcp_ccw_adapter_put(adapter); /* put from zfcp_ccw_adapter_by_cdev */ |
|---|
| 136 | 135 | |
|---|