]> git.karo-electronics.de Git - karo-tx-linux.git/commit
Don't delay freeing mids when blocked on slow socket write of request
authorSteve French <smfrench@gmail.com>
Thu, 4 May 2017 12:54:04 +0000 (07:54 -0500)
committerSteve French <smfrench@gmail.com>
Wed, 10 May 2017 01:37:32 +0000 (20:37 -0500)
commitde1892b887eeb85ce458a93979c2108e6f329618
tree661369262e31859faf6f507586259627ca159952
parent560d388950ceda5e7c7cdef7f3d9a8ff297bbf9d
Don't delay freeing mids when blocked on slow socket write of request

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: Steve French <steve.french@primarydata.com>
Acked-by: Pavel Shilovsky <pshilov@microsoft.com>
fs/cifs/cifssmb.c
fs/cifs/smb2pdu.c
fs/cifs/transport.c