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.c55
1 files changed, 27 insertions, 28 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 6aaa8112c538..2c90d07c0b3a 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -725,8 +725,7 @@ out_nls:
725 goto out; 725 goto out;
726} 726}
727 727
728static ssize_t cifs_file_aio_write(struct kiocb *iocb, const struct iovec *iov, 728static ssize_t cifs_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
729 unsigned long nr_segs, loff_t pos)
730{ 729{
731 struct inode *inode = file_inode(iocb->ki_filp); 730 struct inode *inode = file_inode(iocb->ki_filp);
732 struct cifsInodeInfo *cinode = CIFS_I(inode); 731 struct cifsInodeInfo *cinode = CIFS_I(inode);
@@ -737,14 +736,14 @@ static ssize_t cifs_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
737 if (written) 736 if (written)
738 return written; 737 return written;
739 738
740 written = generic_file_aio_write(iocb, iov, nr_segs, pos); 739 written = generic_file_write_iter(iocb, from);
741 740
742 if (CIFS_CACHE_WRITE(CIFS_I(inode))) 741 if (CIFS_CACHE_WRITE(CIFS_I(inode)))
743 goto out; 742 goto out;
744 743
745 rc = filemap_fdatawrite(inode->i_mapping); 744 rc = filemap_fdatawrite(inode->i_mapping);
746 if (rc) 745 if (rc)
747 cifs_dbg(FYI, "cifs_file_aio_write: %d rc on %p inode\n", 746 cifs_dbg(FYI, "cifs_file_write_iter: %d rc on %p inode\n",
748 rc, inode); 747 rc, inode);
749 748
750out: 749out:
@@ -880,10 +879,10 @@ const struct inode_operations cifs_symlink_inode_ops = {
880}; 879};
881 880
882const struct file_operations cifs_file_ops = { 881const struct file_operations cifs_file_ops = {
883 .read = do_sync_read, 882 .read = new_sync_read,
884 .write = do_sync_write, 883 .write = new_sync_write,
885 .aio_read = generic_file_aio_read, 884 .read_iter = generic_file_read_iter,
886 .aio_write = cifs_file_aio_write, 885 .write_iter = cifs_file_write_iter,
887 .open = cifs_open, 886 .open = cifs_open,
888 .release = cifs_close, 887 .release = cifs_close,
889 .lock = cifs_lock, 888 .lock = cifs_lock,
@@ -899,10 +898,10 @@ const struct file_operations cifs_file_ops = {
899}; 898};
900 899
901const struct file_operations cifs_file_strict_ops = { 900const struct file_operations cifs_file_strict_ops = {
902 .read = do_sync_read, 901 .read = new_sync_read,
903 .write = do_sync_write, 902 .write = new_sync_write,
904 .aio_read = cifs_strict_readv, 903 .read_iter = cifs_strict_readv,
905 .aio_write = cifs_strict_writev, 904 .write_iter = cifs_strict_writev,
906 .open = cifs_open, 905 .open = cifs_open,
907 .release = cifs_close, 906 .release = cifs_close,
908 .lock = cifs_lock, 907 .lock = cifs_lock,
@@ -919,10 +918,10 @@ const struct file_operations cifs_file_strict_ops = {
919 918
920const struct file_operations cifs_file_direct_ops = { 919const struct file_operations cifs_file_direct_ops = {
921 /* BB reevaluate whether they can be done with directio, no cache */ 920 /* BB reevaluate whether they can be done with directio, no cache */
922 .read = do_sync_read, 921 .read = new_sync_read,
923 .write = do_sync_write, 922 .write = new_sync_write,
924 .aio_read = cifs_user_readv, 923 .read_iter = cifs_user_readv,
925 .aio_write = cifs_user_writev, 924 .write_iter = cifs_user_writev,
926 .open = cifs_open, 925 .open = cifs_open,
927 .release = cifs_close, 926 .release = cifs_close,
928 .lock = cifs_lock, 927 .lock = cifs_lock,
@@ -938,10 +937,10 @@ const struct file_operations cifs_file_direct_ops = {
938}; 937};
939 938
940const struct file_operations cifs_file_nobrl_ops = { 939const struct file_operations cifs_file_nobrl_ops = {
941 .read = do_sync_read, 940 .read = new_sync_read,
942 .write = do_sync_write, 941 .write = new_sync_write,
943 .aio_read = generic_file_aio_read, 942 .read_iter = generic_file_read_iter,
944 .aio_write = cifs_file_aio_write, 943 .write_iter = cifs_file_write_iter,
945 .open = cifs_open, 944 .open = cifs_open,
946 .release = cifs_close, 945 .release = cifs_close,
947 .fsync = cifs_fsync, 946 .fsync = cifs_fsync,
@@ -956,10 +955,10 @@ const struct file_operations cifs_file_nobrl_ops = {
956}; 955};
957 956
958const struct file_operations cifs_file_strict_nobrl_ops = { 957const struct file_operations cifs_file_strict_nobrl_ops = {
959 .read = do_sync_read, 958 .read = new_sync_read,
960 .write = do_sync_write, 959 .write = new_sync_write,
961 .aio_read = cifs_strict_readv, 960 .read_iter = cifs_strict_readv,
962 .aio_write = cifs_strict_writev, 961 .write_iter = cifs_strict_writev,
963 .open = cifs_open, 962 .open = cifs_open,
964 .release = cifs_close, 963 .release = cifs_close,
965 .fsync = cifs_strict_fsync, 964 .fsync = cifs_strict_fsync,
@@ -975,10 +974,10 @@ const struct file_operations cifs_file_strict_nobrl_ops = {
975 974
976const struct file_operations cifs_file_direct_nobrl_ops = { 975const struct file_operations cifs_file_direct_nobrl_ops = {
977 /* BB reevaluate whether they can be done with directio, no cache */ 976 /* BB reevaluate whether they can be done with directio, no cache */
978 .read = do_sync_read, 977 .read = new_sync_read,
979 .write = do_sync_write, 978 .write = new_sync_write,
980 .aio_read = cifs_user_readv, 979 .read_iter = cifs_user_readv,
981 .aio_write = cifs_user_writev, 980 .write_iter = cifs_user_writev,
982 .open = cifs_open, 981 .open = cifs_open,
983 .release = cifs_close, 982 .release = cifs_close,
984 .fsync = cifs_fsync, 983 .fsync = cifs_fsync,