]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Push down INP_WLOCK slightly in tcp_ctloutput.
authorjhb <jhb@FreeBSD.org>
Thu, 18 Apr 2019 23:21:26 +0000 (23:21 +0000)
committerjhb <jhb@FreeBSD.org>
Thu, 18 Apr 2019 23:21:26 +0000 (23:21 +0000)
commitb4bd29249cb4e7026093245bf0010ed4be178a75
treef700af2b544d0efb2a6fec6145141443a7d772fd
parent7b5943709e644790fcaf049bc5a1dad9b9e8b2b5
Push down INP_WLOCK slightly in tcp_ctloutput.

The inp lock is not needed for testing the V6 flag as that flag is set
once when the inp is created and never changes.  For non-TCP socket
options the lock is immediately dropped after checking that flag.
This just pushes the lock down to only be acquired for TCP socket
options.

This isn't a hot-path, more a cosmetic cleanup I noticed while reading
the code.

Reviewed by: bz
MFC after: 1 month
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D19740
sys/netinet/tcp_usrreq.c