提交 58bfab39 编写于 作者: A Al Viro

ocfs2_file_aio_write(): switch to generic_perform_write()

Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 aec605f4
...@@ -2381,9 +2381,12 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb, ...@@ -2381,9 +2381,12 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb,
goto out_dio; goto out_dio;
} }
} else { } else {
struct iov_iter from;
iov_iter_init(&from, iov, nr_segs, count, 0);
current->backing_dev_info = file->f_mapping->backing_dev_info; current->backing_dev_info = file->f_mapping->backing_dev_info;
written = generic_file_buffered_write(iocb, iov, nr_segs, *ppos, written = generic_perform_write(file, &from, *ppos);
count, 0); if (likely(written >= 0))
iocb->ki_pos = *ppos + written;
current->backing_dev_info = NULL; current->backing_dev_info = NULL;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册