• Shyam Prasad N's avatar
    cifs: reconnect worker should take reference on server struct unconditionally · 04909192
    Shyam Prasad N authored
    Reconnect worker currently assumes that the server struct
    is alive and only takes reference on the server if it needs
    to call smb2_reconnect.
    
    With the new ability to disable channels based on whether the
    server has multichannel disabled, this becomes a problem when
    we need to disable established channels. While disabling the
    channels and deallocating the server, there could be reconnect
    work that could not be cancelled (because it started).
    
    This change forces the reconnect worker to unconditionally
    take a reference on the server when it runs.
    
    Also, this change now allows smb2_reconnect to know if it was
    called by the reconnect worker. Based on this, the cifs_put_tcp_session
    can decide whether it can cancel the reconnect work synchronously or not.
    Signed-off-by: default avatarShyam Prasad N <sprasad@microsoft.com>
    Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
    04909192
smb2pdu.c 160 KB