From: Eric Dumazet Date: Thu, 8 Feb 2007 22:59:57 +0000 (-0800) Subject: [NET]: cleanup sock_from_file() X-Git-Tag: v2.6.21-rc1~83^2~65^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=23bb80d2158cf4421fe239d788fd53cafb151050;p=pandora-kernel.git [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 Signed-off-by: David S. Miller --- Reading git-diff-tree failed