diff options
Diffstat (limited to 'net/socket.c')
-rw-r--r-- | net/socket.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/net/socket.c b/net/socket.c index 4e396312f8d..fc74930f144 100644 --- a/net/socket.c +++ b/net/socket.c @@ -407,24 +407,11 @@ int sock_map_fd(struct socket *sock) static struct socket *sock_from_file(struct file *file, int *err) { - struct inode *inode; - struct socket *sock; - if (file->f_op == &socket_file_ops) return file->private_data; /* set in sock_map_fd */ - inode = file->f_path.dentry->d_inode; - if (!S_ISSOCK(inode->i_mode)) { - *err = -ENOTSOCK; - return NULL; - } - - sock = SOCKET_I(inode); - if (sock->file != file) { - printk(KERN_ERR "socki_lookup: socket file changed!\n"); - sock->file = file; - } - return sock; + *err = -ENOTSOCK; + return NULL; } /** |