Re: [RFC][PATCHSET] iov_iter work
From: Christoph Hellwig
Date: Tue Jun 08 2021 - 01:26:06 EST
On Mon, Jun 07, 2021 at 04:35:46PM -0700, Linus Torvalds wrote:
> Thinking more about this thing, I think it means that what we *should*
> do is simply just
>
> void iov_iter_init(struct iov_iter *i, unsigned int direction,
> const struct iovec *iov, unsigned long nr_segs,
> size_t count)
> {
> WARN_ON_ONCE(direction & ~(READ | WRITE));
> iWARN_ON_ONCE(uaccess_kernel());
Yes, exactly! (except for the spurious i above, of course).