aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifssmb.c
diff options
context:
space:
mode:
authorPavel Shilovsky <piastry@etersoft.ru>2012-05-17 04:45:31 -0400
committerPavel Shilovsky <pshilovsky@samba.org>2012-05-23 04:33:08 -0400
commit1887f60103aaeeeb7a3fbf3b366d626043873164 (patch)
treefda4c3574550dd4d84f7c656748671edeec7468b /fs/cifs/cifssmb.c
parent082d0642c61fc309ca7f6133968ba1264193dcc1 (diff)
CIFS: Move header_size/max_header_size to ops structure
Acked-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com> Reviewed-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifssmb.c')
-rw-r--r--fs/cifs/cifssmb.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 3563c93d9f17..77463f701f01 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -1400,7 +1400,7 @@ cifs_readv_discard(struct TCP_Server_Info *server, struct mid_q_entry *mid)
1400 1400
1401 length = cifs_read_from_socket(server, server->bigbuf, 1401 length = cifs_read_from_socket(server, server->bigbuf,
1402 min_t(unsigned int, remaining, 1402 min_t(unsigned int, remaining,
1403 CIFSMaxBufSize + max_header_size())); 1403 CIFSMaxBufSize + MAX_HEADER_SIZE(server)));
1404 if (length < 0) 1404 if (length < 0)
1405 return length; 1405 return length;
1406 server->total_read += length; 1406 server->total_read += length;
@@ -1449,9 +1449,10 @@ cifs_readv_receive(struct TCP_Server_Info *server, struct mid_q_entry *mid)
1449 * can if there's not enough data. At this point, we've read down to 1449 * can if there's not enough data. At this point, we've read down to
1450 * the Mid. 1450 * the Mid.
1451 */ 1451 */
1452 len = min_t(unsigned int, buflen, read_rsp_size()) - header_size() + 1; 1452 len = min_t(unsigned int, buflen, read_rsp_size()) -
1453 HEADER_SIZE(server) + 1;
1453 1454
1454 rdata->iov[0].iov_base = buf + header_size() - 1; 1455 rdata->iov[0].iov_base = buf + HEADER_SIZE(server) - 1;
1455 rdata->iov[0].iov_len = len; 1456 rdata->iov[0].iov_len = len;
1456 1457
1457 length = cifs_readv_from_socket(server, rdata->iov, 1, len); 1458 length = cifs_readv_from_socket(server, rdata->iov, 1, len);