diff options
author | Pavel Shilovsky <pshilovsky@samba.org> | 2012-09-18 19:20:30 -0400 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2012-09-24 22:46:28 -0400 |
commit | d8e050398d23ef7c019c96200b80d73f4e5cec0c (patch) | |
tree | 3ba9c436c4c8c6850ae3e5b1e29b86842ef3dc15 /fs/cifs/smb2ops.c | |
parent | f9c6e234c3ca64b8d49336908df99948518d6261 (diff) |
CIFS: Add readpage support for SMB2
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org>
Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/smb2ops.c')
-rw-r--r-- | fs/cifs/smb2ops.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c index da31235023fb..fb289d2abae7 100644 --- a/fs/cifs/smb2ops.c +++ b/fs/cifs/smb2ops.c | |||
@@ -393,6 +393,17 @@ smb2_read_data_length(char *buf) | |||
393 | return le32_to_cpu(rsp->DataLength); | 393 | return le32_to_cpu(rsp->DataLength); |
394 | } | 394 | } |
395 | 395 | ||
396 | |||
397 | static int | ||
398 | smb2_sync_read(const unsigned int xid, struct cifsFileInfo *cfile, | ||
399 | struct cifs_io_parms *parms, unsigned int *bytes_read, | ||
400 | char **buf, int *buf_type) | ||
401 | { | ||
402 | parms->persistent_fid = cfile->fid.persistent_fid; | ||
403 | parms->volatile_fid = cfile->fid.volatile_fid; | ||
404 | return SMB2_read(xid, parms, bytes_read, buf, buf_type); | ||
405 | } | ||
406 | |||
396 | struct smb_version_operations smb21_operations = { | 407 | struct smb_version_operations smb21_operations = { |
397 | .setup_request = smb2_setup_request, | 408 | .setup_request = smb2_setup_request, |
398 | .setup_async_request = smb2_setup_async_request, | 409 | .setup_async_request = smb2_setup_async_request, |
@@ -435,6 +446,7 @@ struct smb_version_operations smb21_operations = { | |||
435 | .flush = smb2_flush_file, | 446 | .flush = smb2_flush_file, |
436 | .async_readv = smb2_async_readv, | 447 | .async_readv = smb2_async_readv, |
437 | .async_writev = smb2_async_writev, | 448 | .async_writev = smb2_async_writev, |
449 | .sync_read = smb2_sync_read, | ||
438 | }; | 450 | }; |
439 | 451 | ||
440 | struct smb_version_values smb21_values = { | 452 | struct smb_version_values smb21_values = { |