mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-29 07:04:10 +08:00
cifs: add WARN_ON for when chan_count goes below minimum
chan_count keeps track of the total number of channels. Since at least the primary channel will always be connected, this value can never go below 1. Warn if that happens. Signed-off-by: Shyam Prasad N <sprasad@microsoft.com> Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
parent
66eb0c6e66
commit
2e0fa298d1
@ -347,6 +347,11 @@ out:
|
||||
/* we rely on all bits beyond chan_count to be clear */
|
||||
cifs_chan_clear_need_reconnect(ses, chan->server);
|
||||
ses->chan_count--;
|
||||
/*
|
||||
* chan_count should never reach 0 as at least the primary
|
||||
* channel is always allocated
|
||||
*/
|
||||
WARN_ON(ses->chan_count < 1);
|
||||
spin_unlock(&ses->chan_lock);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user