Files
linux-apfs/net
Eric Dumazet 23bb80d215 [NET]: cleanup sock_from_file()
I believe dead code from sock_from_file() can be cleaned up.

All sockets are now built using sock_attach_fd(), that puts the 'sock' pointer 
into file->private_data and &socket_file_ops into file->f_op

I could not find a place where file->private_data could be set to NULL, 
keeping opened the file.

So to get 'sock' from a 'file' pointer, either :

- This is a socket file (f_op == &socket_file_ops), and we can directly get 
'sock' from private_data.
- This is not a socket, we return -ENOTSOCK and dont even try to find a socket 
via dentry/inode :)

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-02-08 14:59:57 -08:00
..
2007-02-08 12:38:53 -08:00
2007-02-08 12:39:06 -08:00
2007-02-08 14:16:46 -08:00
2007-02-08 14:16:46 -08:00
2007-02-08 14:16:46 -08:00
2006-11-05 14:11:25 -08:00
2007-02-08 12:39:08 -08:00
2007-02-08 13:51:54 -08:00
2006-08-05 21:15:58 -07:00
2006-12-02 21:21:23 -08:00
2007-01-03 18:38:15 -08:00
2006-12-08 08:28:50 -08:00
2007-02-08 14:59:57 -08:00