Sfoglia il codice sorgente

CIFS: Fix wrong length in cifs_iovec_read

Signed-off-by: Pavel Shilovsky <piastryyy@gmail.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Pavel Shilovsky 14 anni fa
parent
commit
2cebaa58b7
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      fs/cifs/file.c

+ 1 - 1
fs/cifs/file.c

@@ -1737,7 +1737,7 @@ cifs_iovec_read(struct file *file, const struct iovec *iov,
 			io_parms.pid = pid;
 			io_parms.pid = pid;
 			io_parms.tcon = pTcon;
 			io_parms.tcon = pTcon;
 			io_parms.offset = *poffset;
 			io_parms.offset = *poffset;
-			io_parms.length = len;
+			io_parms.length = cur_len;
 			rc = CIFSSMBRead(xid, &io_parms, &bytes_read,
 			rc = CIFSSMBRead(xid, &io_parms, &bytes_read,
 					 &read_data, &buf_type);
 					 &read_data, &buf_type);
 			pSMBr = (struct smb_com_read_rsp *)read_data;
 			pSMBr = (struct smb_com_read_rsp *)read_data;