Skip to content

Commit 05432e2

Browse files
Ronnie Sahlbergsmfrench
authored andcommitted
cifs: remove rfc1002 hardcoded constants from cifs_discard_remaining_data()
Signed-off-by: Ronnie Sahlberg <[email protected]> Signed-off-by: Steve French <[email protected]> Reviewed-by: Pavel Shilovsky <[email protected]>
1 parent 91cb74f commit 05432e2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

fs/cifs/cifssmb.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1418,8 +1418,9 @@ CIFS_open(const unsigned int xid, struct cifs_open_parms *oparms, int *oplock,
14181418
int
14191419
cifs_discard_remaining_data(struct TCP_Server_Info *server)
14201420
{
1421-
unsigned int rfclen = get_rfc1002_length(server->smallbuf);
1422-
int remaining = rfclen + 4 - server->total_read;
1421+
unsigned int rfclen = server->pdu_size;
1422+
int remaining = rfclen + server->vals->header_preamble_size -
1423+
server->total_read;
14231424

14241425
while (remaining > 0) {
14251426
int length;

0 commit comments

Comments
 (0)