]> git.baikalelectronics.ru Git - kernel.git/commit
smb3: check for and properly advertise directory lease support
authorSteve French <stfrench@microsoft.com>
Fri, 31 Aug 2018 20:12:10 +0000 (15:12 -0500)
committerSteve French <stfrench@microsoft.com>
Mon, 3 Sep 2018 04:21:42 +0000 (23:21 -0500)
commit7fb75f5478944d6a8bd5ee3cf9ef1f5c32723087
treecc9936a0b914ed0dd70fd4c7d8f0224091b9bbe6
parentf77f34454b4a7413cf51ef9efc900b8fbec55239
smb3: check for and properly advertise directory lease support

Although servers will typically ignore unsupported features,
we should advertise the support for directory leases (as
Windows e.g. does) in the negotiate protocol capabilities we
pass to the server, and should check for the server capability
(CAP_DIRECTORY_LEASING) before sending a lease request for an
open of a directory.  This will prevent us from accidentally
sending directory leases to SMB2.1 or SMB2 server for example.

Signed-off-by: Steve French <stfrench@microsoft.com>
CC: Stable <stable@vger.kernel.org>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
fs/cifs/smb2ops.c
fs/cifs/smb2pdu.c