mISDN: Cleanup channel also if it already was deactivated
If a channel was closed after it was deactivated it could happen that something was not proper resetted. The test if a channel is still activ was wrong, so remove it and always do the cleanup. Signed-off-by: Karsten Keil <kkeil@linux-pingi.de> Signed-off-by: David S. Miller <davem@davemloft.net>
此提交包含在:
@@ -1420,15 +1420,10 @@ hscx_bctrl(struct mISDNchannel *ch, u32 cmd, void *arg)
|
||||
switch (cmd) {
|
||||
case CLOSE_CHANNEL:
|
||||
test_and_clear_bit(FLG_OPEN, &bch->Flags);
|
||||
if (test_bit(FLG_ACTIVE, &bch->Flags)) {
|
||||
spin_lock_irqsave(hx->ip->hwlock, flags);
|
||||
mISDN_freebchannel(bch);
|
||||
hscx_mode(hx, ISDN_P_NONE);
|
||||
spin_unlock_irqrestore(hx->ip->hwlock, flags);
|
||||
} else {
|
||||
skb_queue_purge(&bch->rqueue);
|
||||
bch->rcount = 0;
|
||||
}
|
||||
spin_lock_irqsave(hx->ip->hwlock, flags);
|
||||
mISDN_freebchannel(bch);
|
||||
hscx_mode(hx, ISDN_P_NONE);
|
||||
spin_unlock_irqrestore(hx->ip->hwlock, flags);
|
||||
ch->protocol = ISDN_P_NONE;
|
||||
ch->peer = NULL;
|
||||
module_put(hx->ip->owner);
|
||||
|
新增問題並參考
封鎖使用者