Эх сурвалжийг харах

cifs: remove rfc1002 hardcoded constants from cifs_discard_remaining_data()

Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
Ronnie Sahlberg 7 жил өмнө
parent
commit
05432e2938
1 өөрчлөгдсөн 3 нэмэгдсэн , 2 устгасан
  1. 3 2
      fs/cifs/cifssmb.c

+ 3 - 2
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;