Why is an inode allocated when creating a socket in kernel?
in the kernel source code allocates an inode when creating a socket, but it’s not used afterwards. I’m not sure why it’s allocated without being used. It’s not simply because sockets are treated as files, as sockets have a file structure as a member. Is there a reason for this allocation, or can we identify where the inode is used in the kernel’s socket API?