aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r--fs/cifs/cifsfs.c22
1 files changed, 3 insertions, 19 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 22bcf4d7e7ae..c00c654f2e11 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -480,25 +480,13 @@ cifs_get_sb(struct file_system_type *fs_type,
480 return simple_set_mnt(mnt, sb); 480 return simple_set_mnt(mnt, sb);
481} 481}
482 482
483static ssize_t cifs_file_writev(struct file *file, const struct iovec *iov, 483static ssize_t cifs_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
484 unsigned long nr_segs, loff_t *ppos) 484 unsigned long nr_segs, loff_t pos)
485{
486 struct inode *inode = file->f_dentry->d_inode;
487 ssize_t written;
488
489 written = generic_file_writev(file, iov, nr_segs, ppos);
490 if (!CIFS_I(inode)->clientCanCacheAll)
491 filemap_fdatawrite(inode->i_mapping);
492 return written;
493}
494
495static ssize_t cifs_file_aio_write(struct kiocb *iocb, const char __user *buf,
496 size_t count, loff_t pos)
497{ 485{
498 struct inode *inode = iocb->ki_filp->f_dentry->d_inode; 486 struct inode *inode = iocb->ki_filp->f_dentry->d_inode;
499 ssize_t written; 487 ssize_t written;
500 488
501 written = generic_file_aio_write(iocb, buf, count, pos); 489 written = generic_file_aio_write(iocb, iov, nr_segs, pos);
502 if (!CIFS_I(inode)->clientCanCacheAll) 490 if (!CIFS_I(inode)->clientCanCacheAll)
503 filemap_fdatawrite(inode->i_mapping); 491 filemap_fdatawrite(inode->i_mapping);
504 return written; 492 return written;
@@ -577,8 +565,6 @@ struct inode_operations cifs_symlink_inode_ops = {
577const struct file_operations cifs_file_ops = { 565const struct file_operations cifs_file_ops = {
578 .read = do_sync_read, 566 .read = do_sync_read,
579 .write = do_sync_write, 567 .write = do_sync_write,
580 .readv = generic_file_readv,
581 .writev = cifs_file_writev,
582 .aio_read = generic_file_aio_read, 568 .aio_read = generic_file_aio_read,
583 .aio_write = cifs_file_aio_write, 569 .aio_write = cifs_file_aio_write,
584 .open = cifs_open, 570 .open = cifs_open,
@@ -620,8 +606,6 @@ const struct file_operations cifs_file_direct_ops = {
620const struct file_operations cifs_file_nobrl_ops = { 606const struct file_operations cifs_file_nobrl_ops = {
621 .read = do_sync_read, 607 .read = do_sync_read,
622 .write = do_sync_write, 608 .write = do_sync_write,
623 .readv = generic_file_readv,
624 .writev = cifs_file_writev,
625 .aio_read = generic_file_aio_read, 609 .aio_read = generic_file_aio_read,
626 .aio_write = cifs_file_aio_write, 610 .aio_write = cifs_file_aio_write,
627 .open = cifs_open, 611 .open = cifs_open,