cvs commit: src/sys/kern uipc_syscalls.c

Robert Watson rwatson at
Thu May 25 08:11:30 PDT 2006

rwatson     2006-05-25 15:10:13 UTC

  FreeBSD src repository

  Modified files:
    sys/kern             uipc_syscalls.c 
  Use getsock() and fput() instead of fgetsock() and fputsock() in
  sendfile().  This causes sendfile() to use the file descriptor
  reference to the socket instead of bumping the socket reference
  count, which avoids an additional refcount operation, as well as a
  potential expensive socket refcount drop, which can lead to
  contention on the accept mutex.  This change also has the side
  effect of further reducing the number of cases where an in-progress
  I/O operation can occur on a socket after close, as using the file
  descriptor refcount prevents the socket from closing while in use.
  MFC after:      3 months
  Revision  Changes    Path
  1.228     +4 -2      src/sys/kern/uipc_syscalls.c

More information about the cvs-src mailing list