git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
block: cleanup REQ_SOFTBARRIER usages
[safe/jmp/linux-2.6]
/
net
/
socket.c
diff --git
a/net/socket.c
b/net/socket.c
index
af0205f
..
791d71a
100644
(file)
--- a/
net/socket.c
+++ b/
net/socket.c
@@
-328,7
+328,7
@@
static char *sockfs_dname(struct dentry *dentry, char *buffer, int buflen)
dentry->d_inode->i_ino);
}
dentry->d_inode->i_ino);
}
-static struct dentry_operations sockfs_dentry_operations = {
+static
const
struct dentry_operations sockfs_dentry_operations = {
.d_delete = sockfs_delete_dentry,
.d_dname = sockfs_dname,
};
.d_delete = sockfs_delete_dentry,
.d_dname = sockfs_dname,
};
@@
-493,8
+493,7
@@
static struct socket *sock_alloc(void)
inode->i_uid = current_fsuid();
inode->i_gid = current_fsgid();
inode->i_uid = current_fsuid();
inode->i_gid = current_fsgid();
- get_cpu_var(sockets_in_use)++;
- put_cpu_var(sockets_in_use);
+ percpu_add(sockets_in_use, 1);
return sock;
}
return sock;
}
@@
-536,8
+535,7
@@
void sock_release(struct socket *sock)
if (sock->fasync_list)
printk(KERN_ERR "sock_release: fasync list not empty!\n");
if (sock->fasync_list)
printk(KERN_ERR "sock_release: fasync list not empty!\n");
- get_cpu_var(sockets_in_use)--;
- put_cpu_var(sockets_in_use);
+ percpu_sub(sockets_in_use, 1);
if (!sock->file) {
iput(SOCK_INODE(sock));
return;
if (!sock->file) {
iput(SOCK_INODE(sock));
return;
@@
-1536,8
+1534,6
@@
SYSCALL_DEFINE4(accept4, int, fd, struct sockaddr __user *, upeer_sockaddr,
fd_install(newfd, newfile);
err = newfd;
fd_install(newfd, newfile);
err = newfd;
- security_socket_post_accept(sock, newsock);
-
out_put:
fput_light(sock->file, fput_needed);
out:
out_put:
fput_light(sock->file, fput_needed);
out: