From: Ronnie Sahlberg Date: Mon, 9 Apr 2018 08:06:31 +0000 (+1000) Subject: cifs: remove rfc1002 hardcoded constants from cifs_discard_remaining_data() X-Git-Tag: v4.19~1180^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=05432e2938ddb8bd942e5a89298e763cf785edb6;p=platform%2Fkernel%2Flinux-rpi.git cifs: remove rfc1002 hardcoded constants from cifs_discard_remaining_data() Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky --- diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 890b3a4..6d3e40d 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c @@ -1418,8 +1418,9 @@ openRetry: 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;