aboutsummaryrefslogtreecommitdiff
path: root/fs/smbfs/sock.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2008-02-15 21:06:08 +0000
committerSteve French <sfrench@us.ibm.com>2008-02-15 21:06:08 +0000
commit0a3abcf75bf391fec4e32356ab5ddb8f5d2e6b41 (patch)
treeb80b1d344ec24cad28b057ef803cebac9434be01 /fs/smbfs/sock.c
parent70eff55d2d979cca700aa6906494f0c474f3f7ff (diff)
parent101142c37be8e5af9b847860219217e6b958c739 (diff)
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'fs/smbfs/sock.c')
-rw-r--r--fs/smbfs/sock.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/smbfs/sock.c b/fs/smbfs/sock.c
index e48bd8235a8..e37fe4deebd 100644
--- a/fs/smbfs/sock.c
+++ b/fs/smbfs/sock.c
@@ -329,9 +329,8 @@ smb_receive(struct smb_sb_info *server, struct smb_request *req)
msg.msg_control = NULL;
/* Dont repeat bytes and count available bufferspace */
- rlen = smb_move_iov(&p, &num, iov, req->rq_bytes_recvd);
- if (req->rq_rlen < rlen)
- rlen = req->rq_rlen;
+ rlen = min_t(int, smb_move_iov(&p, &num, iov, req->rq_bytes_recvd),
+ (req->rq_rlen - req->rq_bytes_recvd));
result = kernel_recvmsg(sock, &msg, p, num, rlen, flags);