]> git.karo-electronics.de Git - karo-tx-linux.git/commit
cifs: lower default and max wsize to what 2.6.39 can handle
authorJeff Layton <jlayton@redhat.com>
Mon, 1 Aug 2011 19:14:16 +0000 (15:14 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 3 Aug 2011 19:42:49 +0000 (12:42 -0700)
commit3d729b1a87d579ce9ebec2008ebbfa1100f0cb90
tree2f4484e1452c61b970886db6d375a7f6a760b9cd
parentc0f3315e568a5424c3b84b987cd57aaecc5aed9b
cifs: lower default and max wsize to what 2.6.39 can handle

This patch is intended for 2.6.39-stable kernels only and is needed to
fix a regression introduced in 2.6.39. Prior to 2.6.39, when signing was
enabled on a socket the client only sent single-page writes. This
changed with commit ca83ce3, which made signed and unsigned connections
use the same codepaths for write calls.

This caused a regression when working with windows servers. Windows
machines will reject writes larger than the MaxBufferSize when signing
is active, but do not clear the CAP_LARGE_WRITE_X flag in the protocol
negotiation. The upshot is that when signing is active, windows servers
often reject large writes from the client in 2.6.39.

Because 3.0 adds support for larger wsize values, simply cherry picking
the upstream patches that fix the wsize negotiation isn't sufficient to
fix this issue. We also need to alter the maximum and default values to
something suitable for 2.6.39.

This patch also accounts for the change in field name from sec_mode to
secMode that went into 3.0.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/cifs/connect.c