diff options
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/cache.c | 4 | ||||
-rw-r--r-- | net/sunrpc/rpc_pipe.c | 2 | ||||
-rw-r--r-- | net/sunrpc/stats.c | 10 | ||||
-rw-r--r-- | net/sunrpc/svc.c | 2 | ||||
-rw-r--r-- | net/sunrpc/xprtsock.c | 53 |
5 files changed, 25 insertions, 46 deletions
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c index 4735caad26ed..20029a79a5de 100644 --- a/net/sunrpc/cache.c +++ b/net/sunrpc/cache.c | |||
@@ -313,7 +313,6 @@ static int create_cache_proc_entries(struct cache_detail *cd) | |||
313 | cd->proc_ent = proc_mkdir(cd->name, proc_net_rpc); | 313 | cd->proc_ent = proc_mkdir(cd->name, proc_net_rpc); |
314 | if (cd->proc_ent == NULL) | 314 | if (cd->proc_ent == NULL) |
315 | goto out_nomem; | 315 | goto out_nomem; |
316 | cd->proc_ent->owner = cd->owner; | ||
317 | cd->channel_ent = cd->content_ent = NULL; | 316 | cd->channel_ent = cd->content_ent = NULL; |
318 | 317 | ||
319 | p = proc_create_data("flush", S_IFREG|S_IRUSR|S_IWUSR, | 318 | p = proc_create_data("flush", S_IFREG|S_IRUSR|S_IWUSR, |
@@ -321,7 +320,6 @@ static int create_cache_proc_entries(struct cache_detail *cd) | |||
321 | cd->flush_ent = p; | 320 | cd->flush_ent = p; |
322 | if (p == NULL) | 321 | if (p == NULL) |
323 | goto out_nomem; | 322 | goto out_nomem; |
324 | p->owner = cd->owner; | ||
325 | 323 | ||
326 | if (cd->cache_request || cd->cache_parse) { | 324 | if (cd->cache_request || cd->cache_parse) { |
327 | p = proc_create_data("channel", S_IFREG|S_IRUSR|S_IWUSR, | 325 | p = proc_create_data("channel", S_IFREG|S_IRUSR|S_IWUSR, |
@@ -329,7 +327,6 @@ static int create_cache_proc_entries(struct cache_detail *cd) | |||
329 | cd->channel_ent = p; | 327 | cd->channel_ent = p; |
330 | if (p == NULL) | 328 | if (p == NULL) |
331 | goto out_nomem; | 329 | goto out_nomem; |
332 | p->owner = cd->owner; | ||
333 | } | 330 | } |
334 | if (cd->cache_show) { | 331 | if (cd->cache_show) { |
335 | p = proc_create_data("content", S_IFREG|S_IRUSR|S_IWUSR, | 332 | p = proc_create_data("content", S_IFREG|S_IRUSR|S_IWUSR, |
@@ -337,7 +334,6 @@ static int create_cache_proc_entries(struct cache_detail *cd) | |||
337 | cd->content_ent = p; | 334 | cd->content_ent = p; |
338 | if (p == NULL) | 335 | if (p == NULL) |
339 | goto out_nomem; | 336 | goto out_nomem; |
340 | p->owner = cd->owner; | ||
341 | } | 337 | } |
342 | return 0; | 338 | return 0; |
343 | out_nomem: | 339 | out_nomem: |
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c index 577385a4a5dc..9ced0628d69c 100644 --- a/net/sunrpc/rpc_pipe.c +++ b/net/sunrpc/rpc_pipe.c | |||
@@ -480,7 +480,7 @@ static int rpc_delete_dentry(struct dentry *dentry) | |||
480 | return 1; | 480 | return 1; |
481 | } | 481 | } |
482 | 482 | ||
483 | static struct dentry_operations rpc_dentry_operations = { | 483 | static const struct dentry_operations rpc_dentry_operations = { |
484 | .d_delete = rpc_delete_dentry, | 484 | .d_delete = rpc_delete_dentry, |
485 | }; | 485 | }; |
486 | 486 | ||
diff --git a/net/sunrpc/stats.c b/net/sunrpc/stats.c index 085372ef4feb..1ef6e46d9da2 100644 --- a/net/sunrpc/stats.c +++ b/net/sunrpc/stats.c | |||
@@ -262,14 +262,8 @@ void | |||
262 | rpc_proc_init(void) | 262 | rpc_proc_init(void) |
263 | { | 263 | { |
264 | dprintk("RPC: registering /proc/net/rpc\n"); | 264 | dprintk("RPC: registering /proc/net/rpc\n"); |
265 | if (!proc_net_rpc) { | 265 | if (!proc_net_rpc) |
266 | struct proc_dir_entry *ent; | 266 | proc_net_rpc = proc_mkdir("rpc", init_net.proc_net); |
267 | ent = proc_mkdir("rpc", init_net.proc_net); | ||
268 | if (ent) { | ||
269 | ent->owner = THIS_MODULE; | ||
270 | proc_net_rpc = ent; | ||
271 | } | ||
272 | } | ||
273 | } | 267 | } |
274 | 268 | ||
275 | void | 269 | void |
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index 8ba654bdd608..9f2f2412a2f3 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c | |||
@@ -312,7 +312,7 @@ svc_pool_map_set_cpumask(struct task_struct *task, unsigned int pidx) | |||
312 | switch (m->mode) { | 312 | switch (m->mode) { |
313 | case SVC_POOL_PERCPU: | 313 | case SVC_POOL_PERCPU: |
314 | { | 314 | { |
315 | set_cpus_allowed_ptr(task, &cpumask_of_cpu(node)); | 315 | set_cpus_allowed_ptr(task, cpumask_of(node)); |
316 | break; | 316 | break; |
317 | } | 317 | } |
318 | case SVC_POOL_PERNODE: | 318 | case SVC_POOL_PERNODE: |
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index fbc8725c20cb..d40ff50887aa 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c | |||
@@ -1280,6 +1280,23 @@ out: | |||
1280 | read_unlock(&sk->sk_callback_lock); | 1280 | read_unlock(&sk->sk_callback_lock); |
1281 | } | 1281 | } |
1282 | 1282 | ||
1283 | static void xs_write_space(struct sock *sk) | ||
1284 | { | ||
1285 | struct socket *sock; | ||
1286 | struct rpc_xprt *xprt; | ||
1287 | |||
1288 | if (unlikely(!(sock = sk->sk_socket))) | ||
1289 | return; | ||
1290 | clear_bit(SOCK_NOSPACE, &sock->flags); | ||
1291 | |||
1292 | if (unlikely(!(xprt = xprt_from_sock(sk)))) | ||
1293 | return; | ||
1294 | if (test_and_clear_bit(SOCK_ASYNC_NOSPACE, &sock->flags) == 0) | ||
1295 | return; | ||
1296 | |||
1297 | xprt_write_space(xprt); | ||
1298 | } | ||
1299 | |||
1283 | /** | 1300 | /** |
1284 | * xs_udp_write_space - callback invoked when socket buffer space | 1301 | * xs_udp_write_space - callback invoked when socket buffer space |
1285 | * becomes available | 1302 | * becomes available |
@@ -1295,23 +1312,9 @@ static void xs_udp_write_space(struct sock *sk) | |||
1295 | read_lock(&sk->sk_callback_lock); | 1312 | read_lock(&sk->sk_callback_lock); |
1296 | 1313 | ||
1297 | /* from net/core/sock.c:sock_def_write_space */ | 1314 | /* from net/core/sock.c:sock_def_write_space */ |
1298 | if (sock_writeable(sk)) { | 1315 | if (sock_writeable(sk)) |
1299 | struct socket *sock; | 1316 | xs_write_space(sk); |
1300 | struct rpc_xprt *xprt; | ||
1301 | 1317 | ||
1302 | if (unlikely(!(sock = sk->sk_socket))) | ||
1303 | goto out; | ||
1304 | clear_bit(SOCK_NOSPACE, &sock->flags); | ||
1305 | |||
1306 | if (unlikely(!(xprt = xprt_from_sock(sk)))) | ||
1307 | goto out; | ||
1308 | if (test_and_clear_bit(SOCK_ASYNC_NOSPACE, &sock->flags) == 0) | ||
1309 | goto out; | ||
1310 | |||
1311 | xprt_write_space(xprt); | ||
1312 | } | ||
1313 | |||
1314 | out: | ||
1315 | read_unlock(&sk->sk_callback_lock); | 1318 | read_unlock(&sk->sk_callback_lock); |
1316 | } | 1319 | } |
1317 | 1320 | ||
@@ -1330,23 +1333,9 @@ static void xs_tcp_write_space(struct sock *sk) | |||
1330 | read_lock(&sk->sk_callback_lock); | 1333 | read_lock(&sk->sk_callback_lock); |
1331 | 1334 | ||
1332 | /* from net/core/stream.c:sk_stream_write_space */ | 1335 | /* from net/core/stream.c:sk_stream_write_space */ |
1333 | if (sk_stream_wspace(sk) >= sk_stream_min_wspace(sk)) { | 1336 | if (sk_stream_wspace(sk) >= sk_stream_min_wspace(sk)) |
1334 | struct socket *sock; | 1337 | xs_write_space(sk); |
1335 | struct rpc_xprt *xprt; | ||
1336 | |||
1337 | if (unlikely(!(sock = sk->sk_socket))) | ||
1338 | goto out; | ||
1339 | clear_bit(SOCK_NOSPACE, &sock->flags); | ||
1340 | 1338 | ||
1341 | if (unlikely(!(xprt = xprt_from_sock(sk)))) | ||
1342 | goto out; | ||
1343 | if (test_and_clear_bit(SOCK_ASYNC_NOSPACE, &sock->flags) == 0) | ||
1344 | goto out; | ||
1345 | |||
1346 | xprt_write_space(xprt); | ||
1347 | } | ||
1348 | |||
1349 | out: | ||
1350 | read_unlock(&sk->sk_callback_lock); | 1339 | read_unlock(&sk->sk_callback_lock); |
1351 | } | 1340 | } |
1352 | 1341 | ||