diff options
author | Steve French <stfrench@microsoft.com> | 2019-09-12 05:46:20 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2019-09-16 19:43:38 +0300 |
commit | 3e7a02d47872081f4b6234a9f72500f1d10f060c (patch) | |
tree | 9d1b1a19b0d85510b38b6afbe848d24080ca62fc /fs/cifs/smb2pdu.c | |
parent | 7dcc82c2dfd5f12eba19d19d39c50bff70b4f94a (diff) | |
download | linux-3e7a02d47872081f4b6234a9f72500f1d10f060c.tar.xz |
smb3: allow disabling requesting leases
In some cases to work around server bugs or performance
problems it can be helpful to be able to disable requesting
SMB2.1/SMB3 leases on a particular mount (not to all servers
and all shares we are mounted to). Add new mount parm
"nolease" which turns off requesting leases on directory
or file opens. Currently the only way to disable leases is
globally through a module load parameter. This is more
granular.
Suggested-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
CC: Stable <stable@vger.kernel.org>
Diffstat (limited to 'fs/cifs/smb2pdu.c')
-rw-r--r-- | fs/cifs/smb2pdu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index 01d5c4af2458..ce647cfdc04f 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -2459,7 +2459,7 @@ SMB2_open_init(struct cifs_tcon *tcon, struct smb_rqst *rqst, __u8 *oplock, iov[1].iov_len = uni_path_len; iov[1].iov_base = path; - if (!server->oplocks) + if ((!server->oplocks) || (tcon->no_lease)) *oplock = SMB2_OPLOCK_LEVEL_NONE; if (!(server->capabilities & SMB2_GLOBAL_CAP_LEASING) || |