Subject: Re: [PATCH 16/17] get rid of the size argument of sock_sendmsg()

From: Al Viro <[email-masked]>
Date: Tue, 14 Apr 2015 17:35:34 +0100

On Tue, Apr 14, 2015 at 04:25:24PM +0000, David Laight wrote:
> From: Al Viro
> > Sent: 11 April 2015 22:18
> > it's equal to iov_iter_count(&msg->msg_iter) in all cases
> 
> I don't know whether this is guaranteed for iov[] that come from
> userspace.
>
> In any case iov_iter_count() is non-trivial and you don't
> really want to call it when unnecessary.

Really?

static inline size_t iov_iter_count(struct iov_iter *i)
{
        return i->count;
}