• Steve French's avatar
    Don't delay freeing mids when blocked on slow socket write of request · de1892b8
    Steve French authored
    When processing responses, and in particular freeing mids (DeleteMidQEntry),
    which is very important since it also frees the associated buffers (cifs_buf_release),
    we can block a long time if (writes to) socket is slow due to low memory or networking
    issues.
    
    We can block in send (smb request) waiting for memory, and be blocked in processing
    responess (which could free memory if we let it) - since they both grab the
    server->srv_mutex.
    
    In practice, in the DeleteMidQEntry case - there is no reason we need to
    grab the srv_mutex so remove these around DeleteMidQEntry, and it allows
    us to free memory faster.
    Signed-off-by: default avatarSteve French <steve.french@primarydata.com>
    Acked-by: default avatarPavel Shilovsky <pshilov@microsoft.com>
    de1892b8
transport.c 27.6 KB