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

From
David Miller <davem@davemloft.net>
Date
2015-04-15 16:06:42
Reply to
David Laight, 2015-04-15
From: David Laight <redacted>
Date: Wed, 15 Apr 2015 08:37:01 +0000
From: David Miller
quoted
Sent: 14 April 2015 18:56
quoted
On Tue, Apr 14, 2015 at 04:25:24PM +0000, David Laight wrote:
quoted
From: Al Viro
quoted
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;
}
This just made my day.
I hate accessor functions
I hate people who jump to conclusions and don't actually read the code
in question before commenting. :-)
Thread (36 messages) 36 messages, 6 authors, last reply 2015-04-15
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help