aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
committerAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
commitada47b5fe13d89735805b566185f4885f5a3f750 (patch)
tree644b88f8a71896307d71438e9b3af49126ffb22b /fs/lockd
parent43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff)
parent3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff)
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'fs/lockd')
-rw-r--r--fs/lockd/clntlock.c1
-rw-r--r--fs/lockd/clntproc.c1
-rw-r--r--fs/lockd/host.c2
-rw-r--r--fs/lockd/mon.c13
-rw-r--r--fs/lockd/svc.c29
-rw-r--r--fs/lockd/svc4proc.c5
-rw-r--r--fs/lockd/svclock.c1
-rw-r--r--fs/lockd/svcproc.c5
-rw-r--r--fs/lockd/svcsubs.c1
9 files changed, 18 insertions, 40 deletions
diff --git a/fs/lockd/clntlock.c b/fs/lockd/clntlock.c
index fc9032dc8862..64fd427c993c 100644
--- a/fs/lockd/clntlock.c
+++ b/fs/lockd/clntlock.c
@@ -8,6 +8,7 @@
8 8
9#include <linux/module.h> 9#include <linux/module.h>
10#include <linux/types.h> 10#include <linux/types.h>
11#include <linux/slab.h>
11#include <linux/time.h> 12#include <linux/time.h>
12#include <linux/nfs_fs.h> 13#include <linux/nfs_fs.h>
13#include <linux/sunrpc/clnt.h> 14#include <linux/sunrpc/clnt.h>
diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c
index c81249fef11f..7932c399fab4 100644
--- a/fs/lockd/clntproc.c
+++ b/fs/lockd/clntproc.c
@@ -8,6 +8,7 @@
8 8
9#include <linux/module.h> 9#include <linux/module.h>
10#include <linux/smp_lock.h> 10#include <linux/smp_lock.h>
11#include <linux/slab.h>
11#include <linux/types.h> 12#include <linux/types.h>
12#include <linux/errno.h> 13#include <linux/errno.h>
13#include <linux/fs.h> 14#include <linux/fs.h>
diff --git a/fs/lockd/host.c b/fs/lockd/host.c
index 4600c2037b8b..bb464d12104c 100644
--- a/fs/lockd/host.c
+++ b/fs/lockd/host.c
@@ -479,8 +479,8 @@ again: mutex_lock(&nlm_host_mutex);
479 } 479 }
480 } 480 }
481 } 481 }
482
483 mutex_unlock(&nlm_host_mutex); 482 mutex_unlock(&nlm_host_mutex);
483 nsm_release(nsm);
484} 484}
485 485
486/* 486/*
diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c
index f956651d0f65..e3015464fbab 100644
--- a/fs/lockd/mon.c
+++ b/fs/lockd/mon.c
@@ -10,6 +10,7 @@
10#include <linux/utsname.h> 10#include <linux/utsname.h>
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/ktime.h> 12#include <linux/ktime.h>
13#include <linux/slab.h>
13 14
14#include <linux/sunrpc/clnt.h> 15#include <linux/sunrpc/clnt.h>
15#include <linux/sunrpc/xprtsock.h> 16#include <linux/sunrpc/xprtsock.h>
@@ -349,9 +350,9 @@ retry:
349 * nsm_reboot_lookup - match NLMPROC_SM_NOTIFY arguments to an nsm_handle 350 * nsm_reboot_lookup - match NLMPROC_SM_NOTIFY arguments to an nsm_handle
350 * @info: pointer to NLMPROC_SM_NOTIFY arguments 351 * @info: pointer to NLMPROC_SM_NOTIFY arguments
351 * 352 *
352 * Returns a matching nsm_handle if found in the nsm cache; the returned 353 * Returns a matching nsm_handle if found in the nsm cache. The returned
353 * nsm_handle's reference count is bumped and sm_monitored is cleared. 354 * nsm_handle's reference count is bumped. Otherwise returns NULL if some
354 * Otherwise returns NULL if some error occurred. 355 * error occurred.
355 */ 356 */
356struct nsm_handle *nsm_reboot_lookup(const struct nlm_reboot *info) 357struct nsm_handle *nsm_reboot_lookup(const struct nlm_reboot *info)
357{ 358{
@@ -370,12 +371,6 @@ struct nsm_handle *nsm_reboot_lookup(const struct nlm_reboot *info)
370 atomic_inc(&cached->sm_count); 371 atomic_inc(&cached->sm_count);
371 spin_unlock(&nsm_lock); 372 spin_unlock(&nsm_lock);
372 373
373 /*
374 * During subsequent lock activity, force a fresh
375 * notification to be set up for this host.
376 */
377 cached->sm_monitored = 0;
378
379 dprintk("lockd: host %s (%s) rebooted, cnt %d\n", 374 dprintk("lockd: host %s (%s) rebooted, cnt %d\n",
380 cached->sm_name, cached->sm_addrbuf, 375 cached->sm_name, cached->sm_addrbuf,
381 atomic_read(&cached->sm_count)); 376 atomic_read(&cached->sm_count));
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
index 1a54ae14a192..f1bacf1a0391 100644
--- a/fs/lockd/svc.c
+++ b/fs/lockd/svc.c
@@ -21,7 +21,6 @@
21#include <linux/errno.h> 21#include <linux/errno.h>
22#include <linux/in.h> 22#include <linux/in.h>
23#include <linux/uio.h> 23#include <linux/uio.h>
24#include <linux/slab.h>
25#include <linux/smp.h> 24#include <linux/smp.h>
26#include <linux/smp_lock.h> 25#include <linux/smp_lock.h>
27#include <linux/mutex.h> 26#include <linux/mutex.h>
@@ -243,11 +242,9 @@ static int make_socks(struct svc_serv *serv)
243 if (err < 0) 242 if (err < 0)
244 goto out_err; 243 goto out_err;
245 244
246#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
247 err = create_lockd_family(serv, PF_INET6); 245 err = create_lockd_family(serv, PF_INET6);
248 if (err < 0 && err != -EAFNOSUPPORT) 246 if (err < 0 && err != -EAFNOSUPPORT)
249 goto out_err; 247 goto out_err;
250#endif /* CONFIG_IPV6 || CONFIG_IPV6_MODULE */
251 248
252 warned = 0; 249 warned = 0;
253 return 0; 250 return 0;
@@ -371,82 +368,74 @@ EXPORT_SYMBOL_GPL(lockd_down);
371 368
372static ctl_table nlm_sysctls[] = { 369static ctl_table nlm_sysctls[] = {
373 { 370 {
374 .ctl_name = CTL_UNNUMBERED,
375 .procname = "nlm_grace_period", 371 .procname = "nlm_grace_period",
376 .data = &nlm_grace_period, 372 .data = &nlm_grace_period,
377 .maxlen = sizeof(unsigned long), 373 .maxlen = sizeof(unsigned long),
378 .mode = 0644, 374 .mode = 0644,
379 .proc_handler = &proc_doulongvec_minmax, 375 .proc_handler = proc_doulongvec_minmax,
380 .extra1 = (unsigned long *) &nlm_grace_period_min, 376 .extra1 = (unsigned long *) &nlm_grace_period_min,
381 .extra2 = (unsigned long *) &nlm_grace_period_max, 377 .extra2 = (unsigned long *) &nlm_grace_period_max,
382 }, 378 },
383 { 379 {
384 .ctl_name = CTL_UNNUMBERED,
385 .procname = "nlm_timeout", 380 .procname = "nlm_timeout",
386 .data = &nlm_timeout, 381 .data = &nlm_timeout,
387 .maxlen = sizeof(unsigned long), 382 .maxlen = sizeof(unsigned long),
388 .mode = 0644, 383 .mode = 0644,
389 .proc_handler = &proc_doulongvec_minmax, 384 .proc_handler = proc_doulongvec_minmax,
390 .extra1 = (unsigned long *) &nlm_timeout_min, 385 .extra1 = (unsigned long *) &nlm_timeout_min,
391 .extra2 = (unsigned long *) &nlm_timeout_max, 386 .extra2 = (unsigned long *) &nlm_timeout_max,
392 }, 387 },
393 { 388 {
394 .ctl_name = CTL_UNNUMBERED,
395 .procname = "nlm_udpport", 389 .procname = "nlm_udpport",
396 .data = &nlm_udpport, 390 .data = &nlm_udpport,
397 .maxlen = sizeof(int), 391 .maxlen = sizeof(int),
398 .mode = 0644, 392 .mode = 0644,
399 .proc_handler = &proc_dointvec_minmax, 393 .proc_handler = proc_dointvec_minmax,
400 .extra1 = (int *) &nlm_port_min, 394 .extra1 = (int *) &nlm_port_min,
401 .extra2 = (int *) &nlm_port_max, 395 .extra2 = (int *) &nlm_port_max,
402 }, 396 },
403 { 397 {
404 .ctl_name = CTL_UNNUMBERED,
405 .procname = "nlm_tcpport", 398 .procname = "nlm_tcpport",
406 .data = &nlm_tcpport, 399 .data = &nlm_tcpport,
407 .maxlen = sizeof(int), 400 .maxlen = sizeof(int),
408 .mode = 0644, 401 .mode = 0644,
409 .proc_handler = &proc_dointvec_minmax, 402 .proc_handler = proc_dointvec_minmax,
410 .extra1 = (int *) &nlm_port_min, 403 .extra1 = (int *) &nlm_port_min,
411 .extra2 = (int *) &nlm_port_max, 404 .extra2 = (int *) &nlm_port_max,
412 }, 405 },
413 { 406 {
414 .ctl_name = CTL_UNNUMBERED,
415 .procname = "nsm_use_hostnames", 407 .procname = "nsm_use_hostnames",
416 .data = &nsm_use_hostnames, 408 .data = &nsm_use_hostnames,
417 .maxlen = sizeof(int), 409 .maxlen = sizeof(int),
418 .mode = 0644, 410 .mode = 0644,
419 .proc_handler = &proc_dointvec, 411 .proc_handler = proc_dointvec,
420 }, 412 },
421 { 413 {
422 .ctl_name = CTL_UNNUMBERED,
423 .procname = "nsm_local_state", 414 .procname = "nsm_local_state",
424 .data = &nsm_local_state, 415 .data = &nsm_local_state,
425 .maxlen = sizeof(int), 416 .maxlen = sizeof(int),
426 .mode = 0644, 417 .mode = 0644,
427 .proc_handler = &proc_dointvec, 418 .proc_handler = proc_dointvec,
428 }, 419 },
429 { .ctl_name = 0 } 420 { }
430}; 421};
431 422
432static ctl_table nlm_sysctl_dir[] = { 423static ctl_table nlm_sysctl_dir[] = {
433 { 424 {
434 .ctl_name = CTL_UNNUMBERED,
435 .procname = "nfs", 425 .procname = "nfs",
436 .mode = 0555, 426 .mode = 0555,
437 .child = nlm_sysctls, 427 .child = nlm_sysctls,
438 }, 428 },
439 { .ctl_name = 0 } 429 { }
440}; 430};
441 431
442static ctl_table nlm_sysctl_root[] = { 432static ctl_table nlm_sysctl_root[] = {
443 { 433 {
444 .ctl_name = CTL_FS,
445 .procname = "fs", 434 .procname = "fs",
446 .mode = 0555, 435 .mode = 0555,
447 .child = nlm_sysctl_dir, 436 .child = nlm_sysctl_dir,
448 }, 437 },
449 { .ctl_name = 0 } 438 { }
450}; 439};
451 440
452#endif /* CONFIG_SYSCTL */ 441#endif /* CONFIG_SYSCTL */
diff --git a/fs/lockd/svc4proc.c b/fs/lockd/svc4proc.c
index bd173a6ca3b1..031c6569a134 100644
--- a/fs/lockd/svc4proc.c
+++ b/fs/lockd/svc4proc.c
@@ -9,12 +9,7 @@
9 9
10#include <linux/types.h> 10#include <linux/types.h>
11#include <linux/time.h> 11#include <linux/time.h>
12#include <linux/slab.h>
13#include <linux/smp_lock.h> 12#include <linux/smp_lock.h>
14#include <linux/in.h>
15#include <linux/sunrpc/svc.h>
16#include <linux/sunrpc/clnt.h>
17#include <linux/nfsd/nfsd.h>
18#include <linux/lockd/lockd.h> 13#include <linux/lockd/lockd.h>
19#include <linux/lockd/share.h> 14#include <linux/lockd/share.h>
20 15
diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c
index d1001790fa9a..84055d31bfc5 100644
--- a/fs/lockd/svclock.c
+++ b/fs/lockd/svclock.c
@@ -21,6 +21,7 @@
21 */ 21 */
22 22
23#include <linux/types.h> 23#include <linux/types.h>
24#include <linux/slab.h>
24#include <linux/errno.h> 25#include <linux/errno.h>
25#include <linux/kernel.h> 26#include <linux/kernel.h>
26#include <linux/sched.h> 27#include <linux/sched.h>
diff --git a/fs/lockd/svcproc.c b/fs/lockd/svcproc.c
index e1d28ddd2169..0f2ab741ae7c 100644
--- a/fs/lockd/svcproc.c
+++ b/fs/lockd/svcproc.c
@@ -9,12 +9,7 @@
9 9
10#include <linux/types.h> 10#include <linux/types.h>
11#include <linux/time.h> 11#include <linux/time.h>
12#include <linux/slab.h>
13#include <linux/smp_lock.h> 12#include <linux/smp_lock.h>
14#include <linux/in.h>
15#include <linux/sunrpc/svc.h>
16#include <linux/sunrpc/clnt.h>
17#include <linux/nfsd/nfsd.h>
18#include <linux/lockd/lockd.h> 13#include <linux/lockd/lockd.h>
19#include <linux/lockd/share.h> 14#include <linux/lockd/share.h>
20 15
diff --git a/fs/lockd/svcsubs.c b/fs/lockd/svcsubs.c
index ad478da7ca63..d0ef94cfb3da 100644
--- a/fs/lockd/svcsubs.c
+++ b/fs/lockd/svcsubs.c
@@ -10,6 +10,7 @@
10#include <linux/string.h> 10#include <linux/string.h>
11#include <linux/time.h> 11#include <linux/time.h>
12#include <linux/in.h> 12#include <linux/in.h>
13#include <linux/slab.h>
13#include <linux/mutex.h> 14#include <linux/mutex.h>
14#include <linux/sunrpc/svc.h> 15#include <linux/sunrpc/svc.h>
15#include <linux/sunrpc/clnt.h> 16#include <linux/sunrpc/clnt.h>