diff options
author | Josef Sipek <jsipek@fsl.cs.sunysb.edu> | 2006-12-08 05:37:23 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-08 11:28:48 -0500 |
commit | 3126a42c4d40c2b963f880cd5c1e00f0b4fb0dc9 (patch) | |
tree | bd7ab71ba30a880ad85aa267090e6db29a81cd9f | |
parent | 92e5baef8578a03335059a3dec933955c361edc1 (diff) |
[PATCH] struct path: convert net
Signed-off-by: Josef Sipek <jsipek@fsl.cs.sunysb.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | net/socket.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/net/socket.c b/net/socket.c index 29ea1de43ecb..4e396312f8d5 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -362,20 +362,20 @@ static int sock_attach_fd(struct socket *sock, struct file *file) | |||
362 | this.name = name; | 362 | this.name = name; |
363 | this.hash = 0; | 363 | this.hash = 0; |
364 | 364 | ||
365 | file->f_dentry = d_alloc(sock_mnt->mnt_sb->s_root, &this); | 365 | file->f_path.dentry = d_alloc(sock_mnt->mnt_sb->s_root, &this); |
366 | if (unlikely(!file->f_dentry)) | 366 | if (unlikely(!file->f_path.dentry)) |
367 | return -ENOMEM; | 367 | return -ENOMEM; |
368 | 368 | ||
369 | file->f_dentry->d_op = &sockfs_dentry_operations; | 369 | file->f_path.dentry->d_op = &sockfs_dentry_operations; |
370 | /* | 370 | /* |
371 | * We dont want to push this dentry into global dentry hash table. | 371 | * We dont want to push this dentry into global dentry hash table. |
372 | * We pretend dentry is already hashed, by unsetting DCACHE_UNHASHED | 372 | * We pretend dentry is already hashed, by unsetting DCACHE_UNHASHED |
373 | * This permits a working /proc/$pid/fd/XXX on sockets | 373 | * This permits a working /proc/$pid/fd/XXX on sockets |
374 | */ | 374 | */ |
375 | file->f_dentry->d_flags &= ~DCACHE_UNHASHED; | 375 | file->f_path.dentry->d_flags &= ~DCACHE_UNHASHED; |
376 | d_instantiate(file->f_dentry, SOCK_INODE(sock)); | 376 | d_instantiate(file->f_path.dentry, SOCK_INODE(sock)); |
377 | file->f_vfsmnt = mntget(sock_mnt); | 377 | file->f_path.mnt = mntget(sock_mnt); |
378 | file->f_mapping = file->f_dentry->d_inode->i_mapping; | 378 | file->f_mapping = file->f_path.dentry->d_inode->i_mapping; |
379 | 379 | ||
380 | sock->file = file; | 380 | sock->file = file; |
381 | file->f_op = SOCK_INODE(sock)->i_fop = &socket_file_ops; | 381 | file->f_op = SOCK_INODE(sock)->i_fop = &socket_file_ops; |
@@ -413,7 +413,7 @@ static struct socket *sock_from_file(struct file *file, int *err) | |||
413 | if (file->f_op == &socket_file_ops) | 413 | if (file->f_op == &socket_file_ops) |
414 | return file->private_data; /* set in sock_map_fd */ | 414 | return file->private_data; /* set in sock_map_fd */ |
415 | 415 | ||
416 | inode = file->f_dentry->d_inode; | 416 | inode = file->f_path.dentry->d_inode; |
417 | if (!S_ISSOCK(inode->i_mode)) { | 417 | if (!S_ISSOCK(inode->i_mode)) { |
418 | *err = -ENOTSOCK; | 418 | *err = -ENOTSOCK; |
419 | return NULL; | 419 | return NULL; |