aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/file.c
diff options
context:
space:
mode:
authorPavel Shilovsky <pshilovsky@samba.org>2012-09-18 19:20:28 -0400
committerSteve French <smfrench@gmail.com>2012-09-24 22:46:27 -0400
commitfc9c59662e0cd37577556d0de865268baeb9b293 (patch)
tree3b89e75e749bd1d06a7cbfd3cf4b074aa67eb7ec /fs/cifs/file.c
parent3a3bab509f3f0e7295caab24e9102ce303edb50b (diff)
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
2488cifs_retry_async_readv(struct cifs_readdata *rdata) 2488cifs_retry_async_readv(struct cifs_readdata *rdata)
2489{ 2489{
2490 int rc; 2490 int rc;
2491 struct TCP_Server_Info *server;
2492
2493 server = tlink_tcon(rdata->cfile->tlink)->ses->server;
2491 2494
2492 do { 2495 do {
2493 if (rdata->cfile->invalidHandle) { 2496 if (rdata->cfile->invalidHandle) {
@@ -2495,7 +2498,7 @@ cifs_retry_async_readv(struct cifs_readdata *rdata)
2495 if (rc != 0) 2498 if (rc != 0)
2496 continue; 2499 continue;
2497 } 2500 }
2498 rc = cifs_async_readv(rdata); 2501 rc = server->ops->async_readv(rdata);
2499 } while (rc == -EAGAIN); 2502 } while (rc == -EAGAIN);
2500 2503
2501 return rc; 2504 return rc;
@@ -2647,6 +2650,9 @@ cifs_iovec_read(struct file *file, const struct iovec *iov,
2647 open_file = file->private_data; 2650 open_file = file->private_data;
2648 tcon = tlink_tcon(open_file->tlink); 2651 tcon = tlink_tcon(open_file->tlink);
2649 2652
2653 if (!tcon->ses->server->ops->async_readv)
2654 return -ENOSYS;
2655
2650 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_RWPIDFORWARD) 2656 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_RWPIDFORWARD)
2651 pid = open_file->pid; 2657 pid = open_file->pid;
2652 else 2658 else