svn commit: r274505 - in projects/sendfile/sys: kern sys
Gleb Smirnoff
glebius at FreeBSD.org
Fri Nov 14 15:34:54 UTC 2014
Author: glebius
Date: Fri Nov 14 15:34:52 2014
New Revision: 274505
URL: https://svnweb.freebsd.org/changeset/base/274505
Log:
Remove sbmtrim().
Modified:
projects/sendfile/sys/kern/uipc_sockbuf.c
projects/sendfile/sys/kern/uipc_socket.c
projects/sendfile/sys/sys/sockbuf.h
Modified: projects/sendfile/sys/kern/uipc_sockbuf.c
==============================================================================
--- projects/sendfile/sys/kern/uipc_sockbuf.c Fri Nov 14 15:33:40 2014 (r274504)
+++ projects/sendfile/sys/kern/uipc_sockbuf.c Fri Nov 14 15:34:52 2014 (r274505)
@@ -184,22 +184,6 @@ sbfree(struct sockbuf *sb, struct mbuf *
}
/*
- * Trim some amount of data from (first?) mbuf in buffer.
- */
-void
-sbmtrim(struct sockbuf *sb, struct mbuf *m, int len)
-{
-
- SOCKBUF_LOCK_ASSERT(sb);
- KASSERT(len < m->m_len, ("%s: m %p len %d", __func__, m, len));
-
- m->m_data += len;
- m->m_len -= len;
- sb->sb_acc -= len;
- sb->sb_ccc -= len;
-}
-
-/*
* Socantsendmore indicates that no more data will be sent on the socket; it
* would normally be applied to a socket when the user informs the system
* that no more data is to be sent, by the protocol code (in case
Modified: projects/sendfile/sys/kern/uipc_socket.c
==============================================================================
--- projects/sendfile/sys/kern/uipc_socket.c Fri Nov 14 15:33:40 2014 (r274504)
+++ projects/sendfile/sys/kern/uipc_socket.c Fri Nov 14 15:34:52 2014 (r274505)
@@ -1810,7 +1810,7 @@ dontblock:
SOCKBUF_LOCK(&so->so_rcv);
}
}
- sbmtrim(&so->so_rcv, m, len);
+ sbcut_locked(&so->so_rcv, len);
}
}
SOCKBUF_LOCK_ASSERT(&so->so_rcv);
Modified: projects/sendfile/sys/sys/sockbuf.h
==============================================================================
--- projects/sendfile/sys/sys/sockbuf.h Fri Nov 14 15:33:40 2014 (r274504)
+++ projects/sendfile/sys/sys/sockbuf.h Fri Nov 14 15:34:52 2014 (r274505)
@@ -174,7 +174,6 @@ int sblock(struct sockbuf *sb, int flags
void sbunlock(struct sockbuf *sb);
void sballoc(struct sockbuf *, struct mbuf *);
void sbfree(struct sockbuf *, struct mbuf *);
-void sbmtrim(struct sockbuf *, struct mbuf *, int);
int sbready(struct sockbuf *, struct mbuf *, int);
/*
More information about the svn-src-projects
mailing list