While running the function in kernel space
Code:
kernel_sock_ioctl(socket, FIONBIO, &on)
it returns error ENOIOCTLCMD 515 /* No ioctl command */

But when executing the same function in userspace

Code:
ioctl(s, FIONBIO, &on)
it succeeds

Why is ioctl missed for the same function in kernel space and how to handle it?

How to apply FIONBIO ioctl in kernel space?