new helper: msg_data_left()

convert open-coded instances

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro
2014-12-15 21:39:31 -05:00
parent a2dd3793a1
commit 01e97e6517
8 changed files with 27 additions and 23 deletions

View File

@@ -56,8 +56,8 @@ static int hash_sendmsg(struct socket *sock, struct msghdr *msg,
ctx->more = 0;
while (iov_iter_count(&msg->msg_iter)) {
int len = iov_iter_count(&msg->msg_iter);
while (msg_data_left(msg)) {
int len = msg_data_left(msg);
if (len > limit)
len = limit;