Messages in this thread | | | Date | Wed, 9 Sep 2009 14:18:38 +0300 | From | Sergey Senozhatsky <> | Subject | aio_read const struct iovec * |
| |
Hello, I have the following question: struct file_operations { ssize_t (*read) (struct file *, char __user *, size_t, loff_t *); ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); At the same time: ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t); ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
'const struct iovec *' both for aio_write and aio_read. And "char __user *" and "const char __user *" for read/write.
For example, pipe_read(struct kiocb *iocb, const struct iovec *_iov, unsigned long nr_segs, loff_t ppos) { struct iovec *iov = (struct iovec *)_iov;
Could we avoid 'struct iovec *iov = (struct iovec *)_iov;' by changing aio_read 'const struct iovec *' to 'struct iovec *'?
Sergey[unhandled content-type:application/pgp-signature] | |