提交 aec605f4 编写于 作者: A Al Viro

ceph_aio_write(): switch to generic_perform_write()

Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 0a64bc2c
......@@ -970,6 +970,7 @@ static ssize_t ceph_aio_write(struct kiocb *iocb, const struct iovec *iov,
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 @@ static ssize_t ceph_aio_write(struct kiocb *iocb, const struct iovec *iov,
* 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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册