socket: Only log splice structs to ktrace if KTR_STRUCT is configured

Fixes:	a1da7dc1cd ("socket: Implement SO_SPLICE")
This commit is contained in:
Mark Johnston 2024-09-20 11:40:31 +00:00
parent 75cd1e534c
commit 283bf3b4b1

View file

@ -3955,7 +3955,8 @@ sosetopt(struct socket *so, struct sockopt *sopt)
if (error)
goto bad;
#ifdef KTRACE
ktrsplice(&splice);
if (KTRPOINT(curthread, KTR_STRUCT))
ktrsplice(&splice);
#endif
error = splice_init();