aboutsummaryrefslogtreecommitdiffstats
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2008-02-15 13:36:30 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-02-15 13:36:30 -0500
commit52833e897fd8c6f62b3e5e27291fa9bc803f7460 (patch)
treecfe90047ee6c7402674a29ec7258319142b96ff1 /net/unix/af_unix.c
parent8d042218b075de3cdbe066198515b3521553746e (diff)
parent4ee29f6a52158cea526b16a44ae38643946103ec (diff)
Merge branch 'linus_origin' into hotfixes
Diffstat (limited to 'net/unix/af_unix.c')
-rw-r--r--net/unix/af_unix.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index eea75888805e..b8788fd5e3c6 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -718,16 +718,16 @@ static struct sock *unix_find_other(struct net *net,
718 goto put_fail; 718 goto put_fail;
719 719
720 err = -ECONNREFUSED; 720 err = -ECONNREFUSED;
721 if (!S_ISSOCK(nd.dentry->d_inode->i_mode)) 721 if (!S_ISSOCK(nd.path.dentry->d_inode->i_mode))
722 goto put_fail; 722 goto put_fail;
723 u=unix_find_socket_byinode(net, nd.dentry->d_inode); 723 u = unix_find_socket_byinode(net, nd.path.dentry->d_inode);
724 if (!u) 724 if (!u)
725 goto put_fail; 725 goto put_fail;
726 726
727 if (u->sk_type == type) 727 if (u->sk_type == type)
728 touch_atime(nd.mnt, nd.dentry); 728 touch_atime(nd.path.mnt, nd.path.dentry);
729 729
730 path_release(&nd); 730 path_put(&nd.path);
731 731
732 err=-EPROTOTYPE; 732 err=-EPROTOTYPE;
733 if (u->sk_type != type) { 733 if (u->sk_type != type) {
@@ -748,7 +748,7 @@ static struct sock *unix_find_other(struct net *net,
748 return u; 748 return u;
749 749
750put_fail: 750put_fail:
751 path_release(&nd); 751 path_put(&nd.path);
752fail: 752fail:
753 *error=err; 753 *error=err;
754 return NULL; 754 return NULL;
@@ -819,12 +819,12 @@ static int unix_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
819 */ 819 */
820 mode = S_IFSOCK | 820 mode = S_IFSOCK |
821 (SOCK_INODE(sock)->i_mode & ~current->fs->umask); 821 (SOCK_INODE(sock)->i_mode & ~current->fs->umask);
822 err = vfs_mknod(nd.dentry->d_inode, dentry, mode, 0); 822 err = vfs_mknod(nd.path.dentry->d_inode, dentry, mode, 0);
823 if (err) 823 if (err)
824 goto out_mknod_dput; 824 goto out_mknod_dput;
825 mutex_unlock(&nd.dentry->d_inode->i_mutex); 825 mutex_unlock(&nd.path.dentry->d_inode->i_mutex);
826 dput(nd.dentry); 826 dput(nd.path.dentry);
827 nd.dentry = dentry; 827 nd.path.dentry = dentry;
828 828
829 addr->hash = UNIX_HASH_SIZE; 829 addr->hash = UNIX_HASH_SIZE;
830 } 830 }
@@ -842,8 +842,8 @@ static int unix_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
842 list = &unix_socket_table[addr->hash]; 842 list = &unix_socket_table[addr->hash];
843 } else { 843 } else {
844 list = &unix_socket_table[dentry->d_inode->i_ino & (UNIX_HASH_SIZE-1)]; 844 list = &unix_socket_table[dentry->d_inode->i_ino & (UNIX_HASH_SIZE-1)];
845 u->dentry = nd.dentry; 845 u->dentry = nd.path.dentry;
846 u->mnt = nd.mnt; 846 u->mnt = nd.path.mnt;
847 } 847 }
848 848
849 err = 0; 849 err = 0;
@@ -861,8 +861,8 @@ out:
861out_mknod_dput: 861out_mknod_dput:
862 dput(dentry); 862 dput(dentry);
863out_mknod_unlock: 863out_mknod_unlock:
864 mutex_unlock(&nd.dentry->d_inode->i_mutex); 864 mutex_unlock(&nd.path.dentry->d_inode->i_mutex);
865 path_release(&nd); 865 path_put(&nd.path);
866out_mknod_parent: 866out_mknod_parent:
867 if (err==-EEXIST) 867 if (err==-EEXIST)
868 err=-EADDRINUSE; 868 err=-EADDRINUSE;