summaryrefslogtreecommitdiffstats
path: root/fs/cifs/file.c
diff options
context:
space:
mode:
authorPavel Shilovsky <pshilovsky@samba.org>2012-09-18 16:20:28 -0700
committerSteve French <smfrench@gmail.com>2012-09-24 21:46:27 -0500
commitfc9c59662e0cd37577556d0de865268baeb9b293 (patch)
tree3b89e75e749bd1d06a7cbfd3cf4b074aa67eb7ec /fs/cifs/file.c
parent3a3bab509f3f0e7295caab24e9102ce303edb50b (diff)
downloadlinux-fc9c59662e0cd37577556d0de865268baeb9b293.tar.gz
linux-fc9c59662e0cd37577556d0de865268baeb9b293.tar.bz2
linux-fc9c59662e0cd37577556d0de865268baeb9b293.zip
CIFS: Move async read to ops struct
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r--fs/cifs/file.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index aa1dccf0df9e..ec7c2e6bcbdf 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -2488,6 +2488,9 @@ static int
cifs_retry_async_readv(struct cifs_readdata *rdata)
{
int rc;
+ struct TCP_Server_Info *server;
+
+ server = tlink_tcon(rdata->cfile->tlink)->ses->server;
do {
if (rdata->cfile->invalidHandle) {
@@ -2495,7 +2498,7 @@ cifs_retry_async_readv(struct cifs_readdata *rdata)
if (rc != 0)
continue;
}
- rc = cifs_async_readv(rdata);
+ rc = server->ops->async_readv(rdata);
} while (rc == -EAGAIN);
return rc;
@@ -2647,6 +2650,9 @@ cifs_iovec_read(struct file *file, const struct iovec *iov,
open_file = file->private_data;
tcon = tlink_tcon(open_file->tlink);
+ if (!tcon->ses->server->ops->async_readv)
+ return -ENOSYS;
+
if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_RWPIDFORWARD)
pid = open_file->pid;
else