aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ntfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ntfs')
-rw-r--r--fs/ntfs/file.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c
index 585a79d39c9d..0c46f5c86b71 100644
--- a/fs/ntfs/file.c
+++ b/fs/ntfs/file.c
@@ -2176,20 +2176,18 @@ out:
2176/** 2176/**
2177 * ntfs_file_aio_write - 2177 * ntfs_file_aio_write -
2178 */ 2178 */
2179static ssize_t ntfs_file_aio_write(struct kiocb *iocb, const char __user *buf, 2179static ssize_t ntfs_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
2180 size_t count, loff_t pos) 2180 unsigned long nr_segs, loff_t pos)
2181{ 2181{
2182 struct file *file = iocb->ki_filp; 2182 struct file *file = iocb->ki_filp;
2183 struct address_space *mapping = file->f_mapping; 2183 struct address_space *mapping = file->f_mapping;
2184 struct inode *inode = mapping->host; 2184 struct inode *inode = mapping->host;
2185 ssize_t ret; 2185 ssize_t ret;
2186 struct iovec local_iov = { .iov_base = (void __user *)buf,
2187 .iov_len = count };
2188 2186
2189 BUG_ON(iocb->ki_pos != pos); 2187 BUG_ON(iocb->ki_pos != pos);
2190 2188
2191 mutex_lock(&inode->i_mutex); 2189 mutex_lock(&inode->i_mutex);
2192 ret = ntfs_file_aio_write_nolock(iocb, &local_iov, 1, &iocb->ki_pos); 2190 ret = ntfs_file_aio_write_nolock(iocb, iov, nr_segs, &iocb->ki_pos);
2193 mutex_unlock(&inode->i_mutex); 2191 mutex_unlock(&inode->i_mutex);
2194 if (ret > 0 && ((file->f_flags & O_SYNC) || IS_SYNC(inode))) { 2192 if (ret > 0 && ((file->f_flags & O_SYNC) || IS_SYNC(inode))) {
2195 int err = sync_page_range(inode, mapping, pos, ret); 2193 int err = sync_page_range(inode, mapping, pos, ret);