aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r--fs/cifs/file.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 29ac8ee46039..703c1648b068 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -1754,6 +1754,7 @@ static int cifs_writepages(struct address_space *mapping,
1754 bool done = false, scanned = false, range_whole = false; 1754 bool done = false, scanned = false, range_whole = false;
1755 pgoff_t end, index; 1755 pgoff_t end, index;
1756 struct cifs_writedata *wdata; 1756 struct cifs_writedata *wdata;
1757 struct TCP_Server_Info *server;
1757 struct page *page; 1758 struct page *page;
1758 int rc = 0; 1759 int rc = 0;
1759 1760
@@ -1904,7 +1905,8 @@ retry:
1904 break; 1905 break;
1905 } 1906 }
1906 wdata->pid = wdata->cfile->pid; 1907 wdata->pid = wdata->cfile->pid;
1907 rc = cifs_async_writev(wdata); 1908 server = tlink_tcon(wdata->cfile->tlink)->ses->server;
1909 rc = server->ops->async_writev(wdata);
1908 } while (wbc->sync_mode == WB_SYNC_ALL && rc == -EAGAIN); 1910 } while (wbc->sync_mode == WB_SYNC_ALL && rc == -EAGAIN);
1909 1911
1910 for (i = 0; i < nr_pages; ++i) 1912 for (i = 0; i < nr_pages; ++i)
@@ -2235,6 +2237,9 @@ static int
2235cifs_uncached_retry_writev(struct cifs_writedata *wdata) 2237cifs_uncached_retry_writev(struct cifs_writedata *wdata)
2236{ 2238{
2237 int rc; 2239 int rc;
2240 struct TCP_Server_Info *server;
2241
2242 server = tlink_tcon(wdata->cfile->tlink)->ses->server;
2238 2243
2239 do { 2244 do {
2240 if (wdata->cfile->invalidHandle) { 2245 if (wdata->cfile->invalidHandle) {
@@ -2242,7 +2247,7 @@ cifs_uncached_retry_writev(struct cifs_writedata *wdata)
2242 if (rc != 0) 2247 if (rc != 0)
2243 continue; 2248 continue;
2244 } 2249 }
2245 rc = cifs_async_writev(wdata); 2250 rc = server->ops->async_writev(wdata);
2246 } while (rc == -EAGAIN); 2251 } while (rc == -EAGAIN);
2247 2252
2248 return rc; 2253 return rc;
@@ -2277,6 +2282,10 @@ cifs_iovec_write(struct file *file, const struct iovec *iov,
2277 cifs_sb = CIFS_SB(file->f_path.dentry->d_sb); 2282 cifs_sb = CIFS_SB(file->f_path.dentry->d_sb);
2278 open_file = file->private_data; 2283 open_file = file->private_data;
2279 tcon = tlink_tcon(open_file->tlink); 2284 tcon = tlink_tcon(open_file->tlink);
2285
2286 if (!tcon->ses->server->ops->async_writev)
2287 return -ENOSYS;
2288
2280 offset = *poffset; 2289 offset = *poffset;
2281 2290
2282 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_RWPIDFORWARD) 2291 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_RWPIDFORWARD)