summaryrefslogtreecommitdiffstats
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2011-10-19 15:29:49 -0400
committerJeff Layton <jlayton@redhat.com>2011-10-19 15:29:49 -0400
commit44d22d846fdc7c3e688fc1ff5ae6d06d08bb5656 (patch)
treea7c55381c4eee74c2be9a4dc0728f0a927367d04 /fs/cifs/connect.c
parente9097ab48978c89b9c0926e2ae5d49bf6ea91b18 (diff)
downloadlinux-44d22d846fdc7c3e688fc1ff5ae6d06d08bb5656.tar.bz2
cifs: add a callback function to receive the rest of the frame
In order to handle larger SMBs for readpages and other calls, we want to be able to read into a preallocated set of buffers. Rather than changing all of the existing code to preallocate buffers however, we instead add a receive callback function to the MID. cifsd will call this function once the mid_q_entry has been identified in order to receive the rest of the SMB. If the mid can't be identified or the receive pointer is unset, then the standard 3rd phase receive function will be called. Reviewed-and-Tested-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Jeff Layton <jlayton@redhat.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r--fs/cifs/connect.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index f05dedda37c6..eeee2f5d13ce 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -824,7 +824,11 @@ cifs_demultiplex_thread(void *p)
mid_entry = find_mid(server, smb_buffer);
- length = standard_receive3(server, mid_entry);
+ if (!mid_entry || !mid_entry->receive)
+ length = standard_receive3(server, mid_entry);
+ else
+ length = mid_entry->receive(server, mid_entry);
+
if (length < 0)
continue;