]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/unix/af_unix.c
Merge with /home/shaggy/git/linus-clean/
[linux-2.6-omap-h63xx.git] / net / unix / af_unix.c
index 5f6ae79b8b1627db8a71be971712b2a6ace18de4..c323cc6a28b0e3f6042058879ead5dd9d5d36aaa 100644 (file)
@@ -547,7 +547,7 @@ static struct sock * unix_create1(struct socket *sock)
        struct sock *sk = NULL;
        struct unix_sock *u;
 
-       if (atomic_read(&unix_nr_socks) >= 2*files_stat.max_files)
+       if (atomic_read(&unix_nr_socks) >= 2*get_max_files())
                goto out;
 
        sk = sk_alloc(PF_UNIX, GFP_KERNEL, &unix_proto, 1);
@@ -784,7 +784,7 @@ static int unix_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
                err = vfs_mknod(nd.dentry->d_inode, dentry, mode, 0);
                if (err)
                        goto out_mknod_dput;
-               up(&nd.dentry->d_inode->i_sem);
+               mutex_unlock(&nd.dentry->d_inode->i_mutex);
                dput(nd.dentry);
                nd.dentry = dentry;
 
@@ -823,7 +823,7 @@ out:
 out_mknod_dput:
        dput(dentry);
 out_mknod_unlock:
-       up(&nd.dentry->d_inode->i_sem);
+       mutex_unlock(&nd.dentry->d_inode->i_mutex);
        path_release(&nd);
 out_mknod_parent:
        if (err==-EEXIST)