Re: [PATCH 06/21] cifs: remove rfc1002 hardcoded constants from cifs_discard_remaining_data()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2018-04-09 1:06 GMT-07:00 Ronnie Sahlberg <lsahlber@xxxxxxxxxx>:
> Signed-off-by: Ronnie Sahlberg <lsahlber@xxxxxxxxxx>
> ---
>  fs/cifs/cifssmb.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
> index 991e9d9ef90a..ae43a28947ab 100644
> --- a/fs/cifs/cifssmb.c
> +++ b/fs/cifs/cifssmb.c
> @@ -1416,8 +1416,9 @@ CIFS_open(const unsigned int xid, struct cifs_open_parms *oparms, int *oplock,
>  int
>  cifs_discard_remaining_data(struct TCP_Server_Info *server)
>  {
> -       unsigned int rfclen = get_rfc1002_length(server->smallbuf);
> -       int remaining = rfclen + 4 - server->total_read;
> +       unsigned int rfclen = server->pdu_size;
> +       int remaining = rfclen + server->vals->header_preamble_size -
> +               server->total_read;
>
>         while (remaining > 0) {
>                 int length;
> --
> 2.13.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reviewed-by: Pavel Shilovsky <pshilov@xxxxxxxxxxxxx>

--
Best regards,
Pavel Shilovsky
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux