aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-02-11 22:28:43 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2014-04-01 23:19:37 -0400
commitaec605f4297d044a2a0d9ceedcf7d33af679c884 (patch)
treec84f07a1bbb5f797400af6c6beb7440f7376de94 /fs
parent0a64bc2c0474640a850febd5ac3abb8d45b32821 (diff)
ceph_aio_write(): switch to generic_perform_write()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/ceph/file.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index a798db5e5e39..2d9088b1bcd9 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -970,6 +970,7 @@ retry_snap:
970 goto retry_snap; 970 goto retry_snap;
971 } 971 }
972 } else { 972 } else {
973 struct iov_iter from;
973 /* 974 /*
974 * No need to acquire the i_truncate_mutex. Because 975 * No need to acquire the i_truncate_mutex. Because
975 * the MDS revokes Fwb caps before sending truncate 976 * the MDS revokes Fwb caps before sending truncate
@@ -977,8 +978,10 @@ retry_snap:
977 * are pending vmtruncate. So write and vmtruncate 978 * are pending vmtruncate. So write and vmtruncate
978 * can not run at the same time 979 * can not run at the same time
979 */ 980 */
980 written = generic_file_buffered_write(iocb, iov, nr_segs, 981 iov_iter_init(&from, iov, nr_segs, count, 0);
981 pos, count, 0); 982 written = generic_perform_write(file, &from, pos);
983 if (likely(written >= 0))
984 iocb->ki_pos = pos + written;
982 mutex_unlock(&inode->i_mutex); 985 mutex_unlock(&inode->i_mutex);
983 } 986 }
984 987