From: Steve French Date: Tue, 22 Sep 2015 14:29:38 +0000 (-0500) Subject: disabling oplocks/leases via module parm enable_oplocks broken for SMB3 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=10ff4a0ca662575c9815b0bc6553d3f263efc24d;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git disabling oplocks/leases via module parm enable_oplocks broken for SMB3 commit e0ddde9d44e37fbc21ce893553094ecf1a633ab5 upstream. leases (oplocks) were always requested for SMB2/SMB3 even when oplocks disabled in the cifs.ko module. Signed-off-by: Steve French Reviewed-by: Chandrika Srinivasan Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c index e12f258a5ffa..66202da4c961 100644 --- a/fs/cifs/smb2ops.c +++ b/fs/cifs/smb2ops.c @@ -48,9 +48,13 @@ change_conf(struct TCP_Server_Info *server) break; default: 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->oplock_credits = 1; } server->credits -= server->echo_credits + server->oplock_credits; return 0;