]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
CIFS: Fix SMB2 oplock break processing
authorPavel Shilovsky <pshilov@microsoft.com>
Thu, 31 Oct 2019 21:18:57 +0000 (14:18 -0700)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Fri, 17 Jan 2020 17:22:26 +0000 (14:22 -0300)
commit23d68cc4e5ef55b675b95c3a23a8363550c4746d
tree4b9ae8c1374925a173750e64616a7508a0992c37
parent0717181e7e586e00796bc394e2ccaa486955f5d7
CIFS: Fix SMB2 oplock break processing

BugLink: https://bugs.launchpad.net/bugs/1857158
commit fa9c2362497fbd64788063288dc4e74daf977ebb upstream.

Even when mounting modern protocol version the server may be
configured without supporting SMB2.1 leases and the client
uses SMB2 oplock to optimize IO performance through local caching.

However there is a problem in oplock break handling that leads
to missing a break notification on the client who has a file
opened. It latter causes big latencies to other clients that
are trying to open the same file.

The problem reproduces when there are multiple shares from the
same server mounted on the client. The processing code tries to
match persistent and volatile file ids from the break notification
with an open file but it skips all share besides the first one.
Fix this by looking up in all shares belonging to the server that
issued the oplock break.

Cc: Stable <stable@vger.kernel.org>
Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
fs/cifs/smb2misc.c