summaryrefslogtreecommitdiffstats
path: root/fs/cifs/smb2ops.c
diff options
context:
space:
mode:
authorPavel Shilovsky <pshilovsky@samba.org>2012-09-19 01:20:30 +0200
committerSteve French <smfrench@gmail.com>2012-09-25 04:46:28 +0200
commitd8e050398d23ef7c019c96200b80d73f4e5cec0c (patch)
tree3ba9c436c4c8c6850ae3e5b1e29b86842ef3dc15 /fs/cifs/smb2ops.c
parentCIFS: Move readpage code to ops struct (diff)
downloadlinux-d8e050398d23ef7c019c96200b80d73f4e5cec0c.tar.xz
linux-d8e050398d23ef7c019c96200b80d73f4e5cec0c.zip
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.c12
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)
return le32_to_cpu(rsp->DataLength);
}
+
+static int
+smb2_sync_read(const unsigned int xid, struct cifsFileInfo *cfile,
+ struct cifs_io_parms *parms, unsigned int *bytes_read,
+ char **buf, int *buf_type)
+{
+ parms->persistent_fid = cfile->fid.persistent_fid;
+ parms->volatile_fid = cfile->fid.volatile_fid;
+ return SMB2_read(xid, parms, bytes_read, buf, buf_type);
+}
+
struct smb_version_operations smb21_operations = {
.setup_request = smb2_setup_request,
.setup_async_request = smb2_setup_async_request,
@@ -435,6 +446,7 @@ struct smb_version_operations smb21_operations = {
.flush = smb2_flush_file,
.async_readv = smb2_async_readv,
.async_writev = smb2_async_writev,
+ .sync_read = smb2_sync_read,
};
struct smb_version_values smb21_values = {