Home
last modified time | relevance | path

Searched refs:trim (Results 1 – 2 of 2) sorted by relevance

/net/core/
Dskmsg.c264 int trim = msg->sg.size - len; in sk_msg_trim() local
267 if (trim <= 0) { in sk_msg_trim()
268 WARN_ON(trim < 0); in sk_msg_trim()
275 trim >= msg->sg.data[i].length) { in sk_msg_trim()
276 trim -= msg->sg.data[i].length; in sk_msg_trim()
279 if (!trim) in sk_msg_trim()
283 msg->sg.data[i].length -= trim; in sk_msg_trim()
284 sk_mem_uncharge(sk, trim); in sk_msg_trim()
/net/sunrpc/
Dxdr.c1689 unsigned int trim = len; in xdr_buf_trim() local
1692 cur = min_t(size_t, buf->tail[0].iov_len, trim); in xdr_buf_trim()
1694 trim -= cur; in xdr_buf_trim()
1695 if (!trim) in xdr_buf_trim()
1700 cur = min_t(unsigned int, buf->page_len, trim); in xdr_buf_trim()
1702 trim -= cur; in xdr_buf_trim()
1703 if (!trim) in xdr_buf_trim()
1708 cur = min_t(size_t, buf->head[0].iov_len, trim); in xdr_buf_trim()
1710 trim -= cur; in xdr_buf_trim()
1713 buf->len -= (len - trim); in xdr_buf_trim()