diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-02-12 03:28:43 (GMT) |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-04-02 03:19:37 (GMT) |
commit | aec605f4297d044a2a0d9ceedcf7d33af679c884 (patch) | |
tree | c84f07a1bbb5f797400af6c6beb7440f7376de94 /fs/ceph | |
parent | 0a64bc2c0474640a850febd5ac3abb8d45b32821 (diff) | |
download | linux-aec605f4297d044a2a0d9ceedcf7d33af679c884.tar.xz |
ceph_aio_write(): switch to generic_perform_write()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/file.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c index a798db5..2d9088b 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c @@ -970,6 +970,7 @@ retry_snap: goto retry_snap; } } else { + struct iov_iter from; /* * No need to acquire the i_truncate_mutex. Because * the MDS revokes Fwb caps before sending truncate @@ -977,8 +978,10 @@ retry_snap: * are pending vmtruncate. So write and vmtruncate * can not run at the same time */ - written = generic_file_buffered_write(iocb, iov, nr_segs, - pos, count, 0); + iov_iter_init(&from, iov, nr_segs, count, 0); + written = generic_perform_write(file, &from, pos); + if (likely(written >= 0)) + iocb->ki_pos = pos + written; mutex_unlock(&inode->i_mutex); } |