socket: wrap ktrsplice call with KTRACE ifdef

This fixes a build error when the kernel is built without KTRACE
support.

Reviewed by:	emaste, markj
Fixes:		a1da7dc1cd ("socket: Implement SO_SPLICE")
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1426
This commit is contained in:
Siva Mahadevan 2024-09-15 21:46:00 -04:00 committed by Mark Johnston
parent 87fbd9fc7f
commit 75cd1e534c

View file

@ -3954,7 +3954,9 @@ sosetopt(struct socket *so, struct sockopt *sopt)
}
if (error)
goto bad;
#ifdef KTRACE
ktrsplice(&splice);
#endif
error = splice_init();
if (error != 0)