lkml.org 
[lkml]   [2011]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[001/264] CIFS: Fix incorrect max RFC1002 write size value
    3.1-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Pavel Shilovsky <piastry@etersoft.ru>

    commit 94443f43404239c2a6dc4252a7cb9e77f5b1eb6e upstream.

    ..the length field has only 17 bits.

    Acked-by: Jeff Layton <jlayton@samba.org>
    Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
    Signed-off-by: Steve French <smfrench@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    fs/cifs/connect.c | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    --- a/fs/cifs/connect.c
    +++ b/fs/cifs/connect.c
    @@ -2807,10 +2807,10 @@ void cifs_setup_cifs_sb(struct smb_vol *

    /*
    * When the server doesn't allow large posix writes, only allow a wsize of
    - * 128k minus the size of the WRITE_AND_X header. That allows for a write up
    + * 2^17-1 minus the size of the WRITE_AND_X header. That allows for a write up
    * to the maximum size described by RFC1002.
    */
    -#define CIFS_MAX_RFC1002_WSIZE (128 * 1024 - sizeof(WRITE_REQ) + 4)
    +#define CIFS_MAX_RFC1002_WSIZE ((1<<17) - 1 - sizeof(WRITE_REQ) + 4)

    /*
    * The default wsize is 1M. find_get_pages seems to return a maximum of 256



    \
     
     \ /
      Last update: 2011-11-10 05:07    [W:0.021 / U:151.980 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site