Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 46989
b: refs/heads/master
c: 23bb80d
h: refs/heads/master
i:
  46987: e7d78c5
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Feb 8, 2007
1 parent 6f4136f commit 55437cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dbca9b2750e3b1ee6f56a616160ccfc12e8b161f
refs/heads/master: 23bb80d2158cf4421fe239d788fd53cafb151050
17 changes: 2 additions & 15 deletions trunk/net/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit 55437cb

Please sign in to comment.