mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
new helper: msg_data_left()
convert open-coded instances Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
a2dd3793a1
commit
01e97e6517
8 changed files with 27 additions and 23 deletions
|
|
@ -612,7 +612,7 @@ EXPORT_SYMBOL(__sock_tx_timestamp);
|
|||
|
||||
static inline int sock_sendmsg_nosec(struct socket *sock, struct msghdr *msg)
|
||||
{
|
||||
int ret = sock->ops->sendmsg(sock, msg, iov_iter_count(&msg->msg_iter));
|
||||
int ret = sock->ops->sendmsg(sock, msg, msg_data_left(msg));
|
||||
BUG_ON(ret == -EIOCBQUEUED);
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -620,7 +620,7 @@ static inline int sock_sendmsg_nosec(struct socket *sock, struct msghdr *msg)
|
|||
int sock_sendmsg(struct socket *sock, struct msghdr *msg)
|
||||
{
|
||||
int err = security_socket_sendmsg(sock, msg,
|
||||
iov_iter_count(&msg->msg_iter));
|
||||
msg_data_left(msg));
|
||||
|
||||
return err ?: sock_sendmsg_nosec(sock, msg);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue