CIFS: Move async read to ops struct
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / fs / cifs / file.c
index aa1dccf0df9eabb3c682578a8cced77898ed4c9e..ec7c2e6bcbdfdbf9bbccf13423328f8be482c4e3 100644 (file)
@@ -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