diff options
author | rwatson <rwatson@FreeBSD.org> | 2006-05-25 15:10:13 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2006-05-25 15:10:13 +0000 |
commit | 032282fd7ed46086875bc10c4810095d40fe6dc4 (patch) | |
tree | 40b298de8236a40b3c96893e7e6d8617031dbd7d /sys/fs/smbfs/smbfs_io.c | |
parent | 2309bc6b916121addb6753b3bb00a087495251ca (diff) | |
download | FreeBSD-src-032282fd7ed46086875bc10c4810095d40fe6dc4.zip FreeBSD-src-032282fd7ed46086875bc10c4810095d40fe6dc4.tar.gz |
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
Diffstat (limited to 'sys/fs/smbfs/smbfs_io.c')
0 files changed, 0 insertions, 0 deletions