Commit 55d3880b authored by Steve French's avatar Steve French Committed by Luis Henriques

disabling oplocks/leases via module parm enable_oplocks broken for SMB3

commit e0ddde9d upstream.

leases (oplocks) were always requested for SMB2/SMB3 even when oplocks
disabled in the cifs.ko module.
Signed-off-by: default avatarSteve French <steve.french@primarydata.com>
Reviewed-by: default avatarChandrika Srinivasan <chandrika.srinivasan@citrix.com>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent fc4c50e1
...@@ -49,9 +49,13 @@ change_conf(struct TCP_Server_Info *server) ...@@ -49,9 +49,13 @@ change_conf(struct TCP_Server_Info *server)
break; break;
default: default:
server->echoes = true; server->echoes = true;
server->oplocks = true; if (enable_oplocks) {
server->oplocks = true;
server->oplock_credits = 1;
} else
server->oplocks = false;
server->echo_credits = 1; server->echo_credits = 1;
server->oplock_credits = 1;
} }
server->credits -= server->echo_credits + server->oplock_credits; server->credits -= server->echo_credits + server->oplock_credits;
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment