Skip to content

Commit

Permalink
cifs: remove rfc1002 hardcoded constants from cifs_discard_remaining_…
Browse files Browse the repository at this point in the history
…data()

Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
  • Loading branch information
Ronnie Sahlberg authored and Steve French committed Apr 13, 2018
1 parent 91cb74f commit 05432e2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fs/cifs/cifssmb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1418,8 +1418,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;
Expand Down

0 comments on commit 05432e2

Please sign in to comment.