diff options
author | Steve French <smfrench@gmail.com> | 2015-09-22 10:29:38 -0400 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2015-09-22 16:23:57 -0400 |
commit | e0ddde9d44e37fbc21ce893553094ecf1a633ab5 (patch) | |
tree | 8b2c0c2acf0542c529fc6263940c47d2c8e843e3 | |
parent | bcee19f424a0d8c26ecf2607b73c690802658b29 (diff) |
disabling oplocks/leases via module parm enable_oplocks broken for SMB3
leases (oplocks) were always requested for SMB2/SMB3 even when oplocks
disabled in the cifs.ko module.
Signed-off-by: Steve French <steve.french@primarydata.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
CC: Stable <stable@vger.kernel.org>
-rw-r--r-- | fs/cifs/smb2ops.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c index df91bcf56d67..18da19f4f811 100644 --- a/fs/cifs/smb2ops.c +++ b/fs/cifs/smb2ops.c | |||
@@ -50,9 +50,13 @@ change_conf(struct TCP_Server_Info *server) | |||
50 | break; | 50 | break; |
51 | default: | 51 | default: |
52 | server->echoes = true; | 52 | server->echoes = true; |
53 | server->oplocks = true; | 53 | if (enable_oplocks) { |
54 | server->oplocks = true; | ||
55 | server->oplock_credits = 1; | ||
56 | } else | ||
57 | server->oplocks = false; | ||
58 | |||
54 | server->echo_credits = 1; | 59 | server->echo_credits = 1; |
55 | server->oplock_credits = 1; | ||
56 | } | 60 | } |
57 | server->credits -= server->echo_credits + server->oplock_credits; | 61 | server->credits -= server->echo_credits + server->oplock_credits; |
58 | return 0; | 62 | return 0; |