Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 6331
b: refs/heads/master
c: 07dc3f0
h: refs/heads/master
i:
  6329: c5d6dde
  6327: a7f9449
v: v3
  • Loading branch information
Benjamin LaHaise authored and David S. Miller committed Aug 29, 2005
1 parent e087378 commit b6a8659
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cef07fd6029c20f95571d09cefce45ee3276a920
refs/heads/master: 07dc3f0718d2c88c3094a0aadeeb4744effc5439
4 changes: 4 additions & 0 deletions trunk/net/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@ int sock_map_fd(struct socket *sock)
file->f_mode = FMODE_READ | FMODE_WRITE;
file->f_flags = O_RDWR;
file->f_pos = 0;
file->private_data = sock;
fd_install(fd, file);
}

Expand Down Expand Up @@ -436,6 +437,9 @@ struct socket *sockfd_lookup(int fd, int *err)
return NULL;
}

if (file->f_op == &socket_file_ops)
return file->private_data; /* set in sock_map_fd */

inode = file->f_dentry->d_inode;
if (!S_ISSOCK(inode->i_mode)) {
*err = -ENOTSOCK;
Expand Down

0 comments on commit b6a8659

Please sign in to comment.