• Shyam Prasad N's avatar
    cifs: make sure that channel scaling is done only once · ee36a3b3
    Shyam Prasad N authored
    Following a successful cifs_tree_connect, we have the code
    to scale up/down the number of channels in the session.
    However, it is not protected by a lock today.
    
    As a result, this code can be executed by several processes
    that select the same channel. The core functions handle this
    well, as they pick chan_lock. However, we've seen cases where
    smb2_reconnect throws some warnings.
    
    To fix that, this change introduces a flags bitmap inside the
    cifs_ses structure. A new flag type is used to ensure that
    only one process enters this section at any time.
    Signed-off-by: default avatarShyam Prasad N <sprasad@microsoft.com>
    Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
    ee36a3b3
cifsglob.h 76 KB